Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -380,25 +380,25 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
|
|
| 380 |
image_submit = gr.Button("Submit", variant="primary")
|
| 381 |
gr.Examples(examples=image_examples, inputs=[image_query, image_upload])
|
| 382 |
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
|
| 403 |
with gr.Accordion("Advanced options", open=False):
|
| 404 |
max_new_tokens = gr.Slider(label="Max new tokens", minimum=1, maximum=MAX_MAX_NEW_TOKENS, step=1, value=DEFAULT_MAX_NEW_TOKENS)
|
|
|
|
| 380 |
image_submit = gr.Button("Submit", variant="primary")
|
| 381 |
gr.Examples(examples=image_examples, inputs=[image_query, image_upload])
|
| 382 |
|
| 383 |
+
with gr.TabItem("Video Inference"):
|
| 384 |
+
video_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
| 385 |
+
video_upload = gr.Video(label="Upload Video", height=290)
|
| 386 |
+
video_submit = gr.Button("Submit", variant="primary")
|
| 387 |
+
gr.Examples(examples=video_examples, inputs=[video_query, video_upload])
|
| 388 |
|
| 389 |
+
with gr.TabItem("PDF Inference"):
|
| 390 |
+
with gr.Row():
|
| 391 |
+
with gr.Column(scale=1):
|
| 392 |
+
pdf_query = gr.Textbox(label="Query Input", placeholder="e.g., 'Summarize this document'")
|
| 393 |
+
pdf_upload = gr.File(label="Upload PDF", file_types=[".pdf"])
|
| 394 |
+
pdf_submit = gr.Button("Submit", variant="primary")
|
| 395 |
+
with gr.Column(scale=1):
|
| 396 |
+
pdf_preview_img = gr.Image(label="PDF Preview", height=290)
|
| 397 |
+
with gr.Row():
|
| 398 |
+
prev_page_btn = gr.Button("◀ Previous")
|
| 399 |
+
page_info = gr.HTML('<div style="text-align:center;">No file loaded</div>')
|
| 400 |
+
next_page_btn = gr.Button("Next ▶")
|
| 401 |
+
gr.Examples(examples=pdf_examples, inputs=[pdf_query, pdf_upload])
|
| 402 |
|
| 403 |
with gr.Accordion("Advanced options", open=False):
|
| 404 |
max_new_tokens = gr.Slider(label="Max new tokens", minimum=1, maximum=MAX_MAX_NEW_TOKENS, step=1, value=DEFAULT_MAX_NEW_TOKENS)
|