diff --git a/docs/_exts/docgen.py b/docs/_exts/docgen.py index a6448db7..a12a8c77 100644 --- a/docs/_exts/docgen.py +++ b/docs/_exts/docgen.py @@ -12,7 +12,7 @@ def __init__(self, output_dir='references', skip_list=[]): self.skip_list = _default_skip_list + skip_list self.expand_func_list = ['core'] self.add_list = [ - 'adapter.api', 'adapter.adapter', 'adapter.openai', 'adapter.diffusers', 'adapter.langchain_models' + 'adapter.api', 'adapter.adapter', 'adapter.openai', 'adapter.diffusers', 'adapter.langchain_models', 'adapter.replicate' ] @staticmethod diff --git a/examples/replicate_examples/vqa.py b/examples/replicate_examples/vqa.py index c5bfb0fc..c6666756 100644 --- a/examples/replicate_examples/vqa.py +++ b/examples/replicate_examples/vqa.py @@ -11,7 +11,7 @@ timm = Timm('resnet18') cache_base = CacheBase('sqlite') vector_base = VectorBase('faiss', dimension=timm.dimension) -object_base = ObjectBase('local', path='./images') +object_base = ObjectBase('local', path='./objects') data_manager = get_data_manager(cache_base, vector_base, object_base) cache.init( @@ -40,6 +40,7 @@ print('Answer:', output) print('Time elapsed 1:', end - start) +start = time.time() output = replicate.run( "andreasjansson/blip-2:xxx", input={ diff --git a/gptcache/adapter/replicate.py b/gptcache/adapter/replicate.py index a86b9f66..2305323d 100644 --- a/gptcache/adapter/replicate.py +++ b/gptcache/adapter/replicate.py @@ -36,7 +36,7 @@ class Client(replicate.client.Client): # run replicate clinet with gptcache output = replicate.run( - "andreasjansson/blip-2:4b32258c42e9efd4288bb9910bc532a69727f9acd26aa08e175713a0a857a608", + "andreasjansson/blip-2:xxx", input={"image": open("/path/to/merlion.png", "rb"), "question": "Which city is this photo taken on?"} )