prithivMLmods commited on
Commit
25ea067
·
verified ·
1 Parent(s): c7b8867

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -246,8 +246,8 @@ def generate(
246
  return
247
 
248
  # New branch for video processing with Qwen2VL.
249
- if lower_text.startswith("@qwen2vl-video"):
250
- prompt = text[len("@qwen2vl-video"):].strip()
251
  if files:
252
  # Assume the first file is a video.
253
  video_path = files[0]
@@ -376,9 +376,9 @@ demo = gr.ChatInterface(
376
  gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
377
  ],
378
  examples=[
379
- [{"text": "@qwen2vl-video Describe the Ad", "files": ["examples/coca.mp4"]}],
380
- [{"text": "@qwen2vl-video Summarize the event in video", "files": ["examples/sky.mp4"]}],
381
- [{"text": "@qwen2vl-video Describe the video", "files": ["examples/Missing.mp4"]}],
382
  ["@image Chocolate dripping from a donut"],
383
  ["Python Program for Array Rotation"],
384
  ["@tts1 Who is Nikola Tesla, and why did he die?"],
@@ -388,9 +388,9 @@ demo = gr.ChatInterface(
388
  ],
389
  cache_examples=False,
390
  type="messages",
391
- description="# **QwQ Edge `@qwen2vl-video 'prompt..', @image, @tts1`**",
392
  fill_height=True,
393
- textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image", "video"], file_count="multiple", placeholder="‎ @tts1, @tts2-voices, @image for image gen, @qwen2vl-video for video, default [text, vision]"),
394
  stop_btn="Stop Generation",
395
  multimodal=True,
396
  )
 
246
  return
247
 
248
  # New branch for video processing with Qwen2VL.
249
+ if lower_text.startswith("@video-infer"):
250
+ prompt = text[len("@video-infer"):].strip()
251
  if files:
252
  # Assume the first file is a video.
253
  video_path = files[0]
 
376
  gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2),
377
  ],
378
  examples=[
379
+ [{"text": "@video-infer Describe the Ad", "files": ["examples/coca.mp4"]}],
380
+ [{"text": "@video-infer Summarize the event in video", "files": ["examples/sky.mp4"]}],
381
+ [{"text": "@video-infer Describe the video", "files": ["examples/Missing.mp4"]}],
382
  ["@image Chocolate dripping from a donut"],
383
  ["Python Program for Array Rotation"],
384
  ["@tts1 Who is Nikola Tesla, and why did he die?"],
 
388
  ],
389
  cache_examples=False,
390
  type="messages",
391
+ description="# **QwQ Edge `@video-infer 'prompt..', @image, @tts1`**",
392
  fill_height=True,
393
+ textbox=gr.MultimodalTextbox(label="Query Input", file_types=["image", "video"], file_count="multiple", placeholder="‎ @tts1, @tts2-voices, @image for image gen, @video-infer for video, default [text, vision]"),
394
  stop_btn="Stop Generation",
395
  multimodal=True,
396
  )