Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -340,7 +340,15 @@ def process_video(user_text, video_path):
|
|
| 340 |
|
| 341 |
return generated_text, out_vid
|
| 342 |
|
| 343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
gr.Markdown("# **Molmo2 HF Demo**")
|
| 345 |
gr.Markdown("Supports Multi-image QA, Pointing, General Video QA, and Tracking.")
|
| 346 |
|
|
@@ -371,7 +379,7 @@ with gr.Blocks(title="") as demo:
|
|
| 371 |
vid_btn = gr.Button("Run Video Analysis", variant="primary")
|
| 372 |
|
| 373 |
with gr.Column():
|
| 374 |
-
vid_text_out = gr.Textbox(label="Generated Text")
|
| 375 |
vid_out = gr.Video(label="Output Video (Annotated if applicable)")
|
| 376 |
|
| 377 |
vid_btn.click(
|
|
@@ -381,4 +389,4 @@ with gr.Blocks(title="") as demo:
|
|
| 381 |
)
|
| 382 |
|
| 383 |
if __name__ == "__main__":
|
| 384 |
-
demo.launch(theme=orange_red_theme, mcp_server=True, ssr_mode=False, show_error=True)
|
|
|
|
| 340 |
|
| 341 |
return generated_text, out_vid
|
| 342 |
|
| 343 |
+
css="""
|
| 344 |
+
#col-container {
|
| 345 |
+
margin: 0 auto;
|
| 346 |
+
max-width: 960px;
|
| 347 |
+
}
|
| 348 |
+
#main-title h1 {font-size: 2.1em !important;}
|
| 349 |
+
"""
|
| 350 |
+
|
| 351 |
+
with gr.Blocks() as demo:
|
| 352 |
gr.Markdown("# **Molmo2 HF Demo**")
|
| 353 |
gr.Markdown("Supports Multi-image QA, Pointing, General Video QA, and Tracking.")
|
| 354 |
|
|
|
|
| 379 |
vid_btn = gr.Button("Run Video Analysis", variant="primary")
|
| 380 |
|
| 381 |
with gr.Column():
|
| 382 |
+
vid_text_out = gr.Textbox(label="Generated Text", lines=5)
|
| 383 |
vid_out = gr.Video(label="Output Video (Annotated if applicable)")
|
| 384 |
|
| 385 |
vid_btn.click(
|
|
|
|
| 389 |
)
|
| 390 |
|
| 391 |
if __name__ == "__main__":
|
| 392 |
+
demo.launch(theme=orange_red_theme, css=css, mcp_server=True, ssr_mode=False, show_error=True)
|