Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -121,7 +121,7 @@ def generate_caption_llava(image_path, caption_bool):
|
|
121 |
inputs = processor(text_prompt, Image.open(image_path), return_tensors="pt").to(device)
|
122 |
output = model.generate(**inputs, max_new_tokens=100)
|
123 |
|
124 |
-
return processor.decode(output[0], skip_special_tokens=True)
|
125 |
|
126 |
@spaces.GPU
|
127 |
def generate_answer_llava(image_path, question):
|
|
|
121 |
inputs = processor(text_prompt, Image.open(image_path), return_tensors="pt").to(device)
|
122 |
output = model.generate(**inputs, max_new_tokens=100)
|
123 |
|
124 |
+
return processor.decode(output[0], skip_special_tokens=True).split("[/INST]")[1]
|
125 |
|
126 |
@spaces.GPU
|
127 |
def generate_answer_llava(image_path, question):
|