Spaces:
Build error
Build error
Commit
·
6473f86
1
Parent(s):
b52bed7
Minor fix
Browse files
app.py
CHANGED
|
@@ -52,10 +52,10 @@ def infer(message, history):
|
|
| 52 |
combined_embeds = []
|
| 53 |
|
| 54 |
with torch.no_grad():
|
| 55 |
-
if message['
|
| 56 |
projected_image_embeds = None
|
| 57 |
audio_text_embeds = None
|
| 58 |
-
for path in message['
|
| 59 |
|
| 60 |
if path.endswith(('.jpg', '.png', '.jpeg')):
|
| 61 |
image = clip_preprocess(Image.open(path)).unsqueeze(0).to(device)
|
|
|
|
| 52 |
combined_embeds = []
|
| 53 |
|
| 54 |
with torch.no_grad():
|
| 55 |
+
if message['files']:
|
| 56 |
projected_image_embeds = None
|
| 57 |
audio_text_embeds = None
|
| 58 |
+
for path in message['files']:
|
| 59 |
|
| 60 |
if path.endswith(('.jpg', '.png', '.jpeg')):
|
| 61 |
image = clip_preprocess(Image.open(path)).unsqueeze(0).to(device)
|