Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
# Importing the requirements
|
| 2 |
# import warnings
|
| 3 |
-
|
| 4 |
# warnings.filterwarnings("ignore")
|
| 5 |
|
| 6 |
import gradio as gr
|
|
@@ -9,10 +8,10 @@ from src.model import describe_video
|
|
| 9 |
|
| 10 |
# Video and text inputs for the interface
|
| 11 |
video = gr.Video(label="Video")
|
| 12 |
-
query = gr.Textbox(label="
|
| 13 |
|
| 14 |
# Output for the interface
|
| 15 |
-
response = gr.Textbox(label="
|
| 16 |
|
| 17 |
# Examples for the interface
|
| 18 |
examples = [
|
|
@@ -29,8 +28,8 @@ examples = [
|
|
| 29 |
|
| 30 |
# Title, description, and article for the interface
|
| 31 |
title = "Video Understanding & Question Answering"
|
| 32 |
-
description = "This Gradio demo uses the MiniCPM-V-2_6 model for video understanding tasks.
|
| 33 |
-
article = "<p style='text-align: center'><a href='https://
|
| 34 |
|
| 35 |
|
| 36 |
# Launch the interface
|
|
|
|
| 1 |
# Importing the requirements
|
| 2 |
# import warnings
|
|
|
|
| 3 |
# warnings.filterwarnings("ignore")
|
| 4 |
|
| 5 |
import gradio as gr
|
|
|
|
| 8 |
|
| 9 |
# Video and text inputs for the interface
|
| 10 |
video = gr.Video(label="Video")
|
| 11 |
+
query = gr.Textbox(label="Question", placeholder="Enter your question here")
|
| 12 |
|
| 13 |
# Output for the interface
|
| 14 |
+
response = gr.Textbox(label="Predicted answer", show_label=True, show_copy_button=True)
|
| 15 |
|
| 16 |
# Examples for the interface
|
| 17 |
examples = [
|
|
|
|
| 28 |
|
| 29 |
# Title, description, and article for the interface
|
| 30 |
title = "Video Understanding & Question Answering"
|
| 31 |
+
description = "This Gradio demo uses the MiniCPM-V-2_6 model for video understanding tasks. To use it, simply upload your video and type a question and click 'submit', or click one of the examples to load them. Read more at the links below."
|
| 32 |
+
article = "<p style='text-align: center'><a href='https://github.com/OpenBMB/MiniCPM-V' target='_blank'>Model GitHub Repo</a> | <a href='https://huggingface.co/openbmb/MiniCPM-V-2_6' target='_blank'>Model Page</a></p>"
|
| 33 |
|
| 34 |
|
| 35 |
# Launch the interface
|