ManishThota commited on
Commit
b50f60b
1 Parent(s): 1f932c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -61,7 +61,7 @@ def extract_frames(frame):
61
 
62
  return image_bgr
63
 
64
- def predict_answer(image, video, question):
65
 
66
  text = f"A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: <image>\n{question}? ASSISTANT:"
67
  input_ids = tokenizer(text, return_tensors='pt').input_ids.to(device)
@@ -153,8 +153,8 @@ test_examples = [[None, "Images/cat_dog.jpeg", promt_cat_dog],
153
  ["videos/v3.mp4",None,promt_video]]
154
 
155
 
156
- def gradio_predict(image, video, question):
157
- answer = predict_answer(image, video, question)
158
  return answer
159
 
160
  css = """
 
61
 
62
  return image_bgr
63
 
64
+ def predict_answer(video,image, question):
65
 
66
  text = f"A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: <image>\n{question}? ASSISTANT:"
67
  input_ids = tokenizer(text, return_tensors='pt').input_ids.to(device)
 
153
  ["videos/v3.mp4",None,promt_video]]
154
 
155
 
156
+ def gradio_predict(video,image, question):
157
+ answer = predict_answer(video,image, question)
158
  return answer
159
 
160
  css = """