ManishThota commited on
Commit
7bf6cc7
1 Parent(s): d0246f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- return tokenizer.decode(output_ids[input_ids.shape[1]:], skip_special_tokens=True).strip()
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 = []