Spaces:
Runtime error
Runtime error
clean all codes
Browse files
app.py
CHANGED
|
@@ -105,7 +105,6 @@ def load_models(args):
|
|
| 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'])
|
|
|
|
| 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'])
|