prithivMLmods commited on
Commit
2adb6bc
·
verified ·
1 Parent(s): 22ddc51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -202,14 +202,15 @@ def generate_video(model_name: str, text: str, video_path: str,
202
  buffer = ""
203
  for new_text in streamer:
204
  buffer += new_text
 
205
  time.sleep(0.01)
206
  yield buffer
207
 
208
  # Define examples for image and video inference
209
  image_examples = [
210
- ["OCR the table", "example/image1.png"],
211
- ["Explain the scene", "example/image2.jpg"],
212
- ["Fill the correct numbers", "example/image3.png"],
213
  ]
214
 
215
  video_examples = [
 
202
  buffer = ""
203
  for new_text in streamer:
204
  buffer += new_text
205
+ buffer = buffer.replace("<|im_end|>", "")
206
  time.sleep(0.01)
207
  yield buffer
208
 
209
  # Define examples for image and video inference
210
  image_examples = [
211
+ ["ocr the image", "example/image1.png"],
212
+ ["explain the scene", "example/image2.jpg"],
213
+ ["fill the correct numbers", "example/image3.png"],
214
  ]
215
 
216
  video_examples = [