Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -92,9 +92,9 @@ def predict_answer(video, image, question):
|
|
92 |
max_new_tokens=25,
|
93 |
images=image_tensor,
|
94 |
use_cache=True)[0]
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
# # Process as a video
|
99 |
# frames = video_to_frames(video)
|
100 |
# answers = []
|
|
|
92 |
max_new_tokens=25,
|
93 |
images=image_tensor,
|
94 |
use_cache=True)[0]
|
95 |
+
answer = tokenizer.decode(output_ids[input_ids.shape[1]:], skip_special_tokens=True).strip()
|
96 |
+
|
97 |
+
return ast.literal_eval(answer)
|
98 |
# # Process as a video
|
99 |
# frames = video_to_frames(video)
|
100 |
# answers = []
|