Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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("@
|
250 |
-
prompt = text[len("@
|
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": "@
|
380 |
-
[{"text": "@
|
381 |
-
[{"text": "@
|
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 `@
|
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, @
|
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 |
)
|