Spaces:
Runtime error
Runtime error
update req
Browse files- app.py +1 -0
- requirements.txt +2 -1
app.py
CHANGED
@@ -105,6 +105,7 @@ def load_models(args):
|
|
105 |
@torch.no_grad()
|
106 |
def predict(images, input_text, model_name):
|
107 |
start_time = time.time()
|
|
|
108 |
input_images = model_dict['clip_preprocess'](images, return_tensors='pt')['pixel_values'].to(model_dict['device'])
|
109 |
input_text = input_text.replace('$', '[$]')
|
110 |
input_tokens = model_dict['tokenizer'](text=input_text, return_tensors='pt', padding='max_length', truncation=True)['input_ids'].to(model_dict['device'])
|
|
|
105 |
@torch.no_grad()
|
106 |
def predict(images, input_text, model_name):
|
107 |
start_time = time.time()
|
108 |
+
print(images)
|
109 |
input_images = model_dict['clip_preprocess'](images, return_tensors='pt')['pixel_values'].to(model_dict['device'])
|
110 |
input_text = input_text.replace('$', '[$]')
|
111 |
input_tokens = model_dict['tokenizer'](text=input_text, return_tensors='pt', padding='max_length', truncation=True)['input_ids'].to(model_dict['device'])
|
requirements.txt
CHANGED
@@ -5,4 +5,5 @@ diffusers
|
|
5 |
accelerate
|
6 |
datasets
|
7 |
spacy
|
8 |
-
|
|
|
|
5 |
accelerate
|
6 |
datasets
|
7 |
spacy
|
8 |
+
faiss-cpu
|
9 |
+
git+https://github.com/openai/CLIP.git
|