Spaces:
Running
on
Zero
Running
on
Zero
update app
Browse files
app.py
CHANGED
|
@@ -429,12 +429,6 @@ with gr.Blocks(theme=orange_red_theme, css=css) as demo:
|
|
| 429 |
image_submit = gr.Button("Submit", variant="primary")
|
| 430 |
gr.Examples(examples=image_examples, inputs=[image_query, image_upload])
|
| 431 |
|
| 432 |
-
with gr.TabItem("Video Inference"):
|
| 433 |
-
video_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
| 434 |
-
video_upload = gr.Video(label="Upload Video(≤30s)", height=290)
|
| 435 |
-
video_submit = gr.Button("Submit", variant="primary")
|
| 436 |
-
gr.Examples(examples=video_examples, inputs=[video_query, video_upload])
|
| 437 |
-
|
| 438 |
with gr.TabItem("PDF Inference"):
|
| 439 |
with gr.Row():
|
| 440 |
with gr.Column(scale=1):
|
|
@@ -449,17 +443,23 @@ with gr.Blocks(theme=orange_red_theme, css=css) as demo:
|
|
| 449 |
next_page_btn = gr.Button("Next ▶")
|
| 450 |
gr.Examples(examples=pdf_examples, inputs=[pdf_query, pdf_upload])
|
| 451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 452 |
with gr.TabItem("Gif Inference"):
|
| 453 |
gif_query = gr.Textbox(label="Query Input", placeholder="e.g., 'What is happening in this gif?'")
|
| 454 |
gif_upload = gr.Image(type="filepath", label="Upload GIF", height=290)
|
| 455 |
gif_submit = gr.Button("Submit", variant="primary")
|
| 456 |
gr.Examples(examples=gif_examples, inputs=[gif_query, gif_upload])
|
| 457 |
-
|
| 458 |
-
with gr.TabItem("Caption"):
|
| 459 |
-
caption_image_upload = gr.Image(type="pil", label="Image to Caption", height=290)
|
| 460 |
-
caption_submit = gr.Button("Generate Caption", variant="primary")
|
| 461 |
-
gr.Examples(examples=caption_examples, inputs=[caption_image_upload])
|
| 462 |
-
|
| 463 |
with gr.Accordion("Advanced options", open=False):
|
| 464 |
max_new_tokens = gr.Slider(label="Max new tokens", minimum=1, maximum=MAX_MAX_NEW_TOKENS, step=1, value=DEFAULT_MAX_NEW_TOKENS)
|
| 465 |
temperature = gr.Slider(label="Temperature", minimum=0.1, maximum=4.0, step=0.1, value=0.6)
|
|
|
|
| 429 |
image_submit = gr.Button("Submit", variant="primary")
|
| 430 |
gr.Examples(examples=image_examples, inputs=[image_query, image_upload])
|
| 431 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
with gr.TabItem("PDF Inference"):
|
| 433 |
with gr.Row():
|
| 434 |
with gr.Column(scale=1):
|
|
|
|
| 443 |
next_page_btn = gr.Button("Next ▶")
|
| 444 |
gr.Examples(examples=pdf_examples, inputs=[pdf_query, pdf_upload])
|
| 445 |
|
| 446 |
+
with gr.TabItem("Long Caption"):
|
| 447 |
+
caption_image_upload = gr.Image(type="pil", label="Image to Caption", height=290)
|
| 448 |
+
caption_submit = gr.Button("Generate Caption", variant="primary")
|
| 449 |
+
gr.Examples(examples=caption_examples, inputs=[caption_image_upload])
|
| 450 |
+
|
| 451 |
+
with gr.TabItem("Video Inference"):
|
| 452 |
+
video_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
| 453 |
+
video_upload = gr.Video(label="Upload Video(≤30s)", height=290)
|
| 454 |
+
video_submit = gr.Button("Submit", variant="primary")
|
| 455 |
+
gr.Examples(examples=video_examples, inputs=[video_query, video_upload])
|
| 456 |
+
|
| 457 |
with gr.TabItem("Gif Inference"):
|
| 458 |
gif_query = gr.Textbox(label="Query Input", placeholder="e.g., 'What is happening in this gif?'")
|
| 459 |
gif_upload = gr.Image(type="filepath", label="Upload GIF", height=290)
|
| 460 |
gif_submit = gr.Button("Submit", variant="primary")
|
| 461 |
gr.Examples(examples=gif_examples, inputs=[gif_query, gif_upload])
|
| 462 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 463 |
with gr.Accordion("Advanced options", open=False):
|
| 464 |
max_new_tokens = gr.Slider(label="Max new tokens", minimum=1, maximum=MAX_MAX_NEW_TOKENS, step=1, value=DEFAULT_MAX_NEW_TOKENS)
|
| 465 |
temperature = gr.Slider(label="Temperature", minimum=0.1, maximum=4.0, step=0.1, value=0.6)
|