Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -118,7 +118,7 @@ def generate_caption_llava(image_path, caption_bool):
|
|
| 118 |
else:
|
| 119 |
text_prompt =f"[INST] <image>\nCaption this image briefly in objective manner. [/INST]"
|
| 120 |
|
| 121 |
-
inputs = processor(
|
| 122 |
|
| 123 |
output = model.generate(**inputs, max_new_tokens=100)
|
| 124 |
|
|
|
|
| 118 |
else:
|
| 119 |
text_prompt =f"[INST] <image>\nCaption this image briefly in objective manner. [/INST]"
|
| 120 |
|
| 121 |
+
inputs = processor(text_prompt, Image.open(image_path), return_tensors="pt").to(device)
|
| 122 |
|
| 123 |
output = model.generate(**inputs, max_new_tokens=100)
|
| 124 |
|