Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -162,16 +162,27 @@ video_examples = [
|
|
| 162 |
["Identify the main actions in the video", "videos/2.mp4"]
|
| 163 |
]
|
| 164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
# Create the Gradio Interface
|
| 166 |
-
with gr.Blocks() as demo:
|
| 167 |
-
gr.Markdown("
|
| 168 |
with gr.Row():
|
| 169 |
with gr.Column():
|
| 170 |
with gr.Tabs():
|
| 171 |
with gr.TabItem("Image Inference"):
|
| 172 |
image_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
| 173 |
image_upload = gr.Image(type="pil", label="Image")
|
| 174 |
-
image_submit = gr.Button("Submit")
|
| 175 |
gr.Examples(
|
| 176 |
examples=image_examples,
|
| 177 |
inputs=[image_query, image_upload]
|
|
@@ -179,7 +190,7 @@ with gr.Blocks() as demo:
|
|
| 179 |
with gr.TabItem("Video Inference"):
|
| 180 |
video_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
| 181 |
video_upload = gr.Video(label="Video")
|
| 182 |
-
video_submit = gr.Button("Submit")
|
| 183 |
gr.Examples(
|
| 184 |
examples=video_examples,
|
| 185 |
inputs=[video_query, video_upload]
|
|
|
|
| 162 |
["Identify the main actions in the video", "videos/2.mp4"]
|
| 163 |
]
|
| 164 |
|
| 165 |
+
|
| 166 |
+
css = """
|
| 167 |
+
.submit-btn {
|
| 168 |
+
background-color: #2980b9 !important;
|
| 169 |
+
color: white !important;
|
| 170 |
+
}
|
| 171 |
+
.submit-btn:hover {
|
| 172 |
+
background-color: #3498db !important;
|
| 173 |
+
}
|
| 174 |
+
"""
|
| 175 |
+
|
| 176 |
# Create the Gradio Interface
|
| 177 |
+
with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
| 178 |
+
gr.Markdown("# **Cosmos-Reason1 by [NVIDIA](https://huggingface.co/nvidia/Cosmos-Reason1-7B)**")
|
| 179 |
with gr.Row():
|
| 180 |
with gr.Column():
|
| 181 |
with gr.Tabs():
|
| 182 |
with gr.TabItem("Image Inference"):
|
| 183 |
image_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
| 184 |
image_upload = gr.Image(type="pil", label="Image")
|
| 185 |
+
image_submit = gr.Button("Submit", elem_classes="submit-btn")
|
| 186 |
gr.Examples(
|
| 187 |
examples=image_examples,
|
| 188 |
inputs=[image_query, image_upload]
|
|
|
|
| 190 |
with gr.TabItem("Video Inference"):
|
| 191 |
video_query = gr.Textbox(label="Query Input", placeholder="Enter your query here...")
|
| 192 |
video_upload = gr.Video(label="Video")
|
| 193 |
+
video_submit = gr.Button("Submit", elem_classes="submit-btn")
|
| 194 |
gr.Examples(
|
| 195 |
examples=video_examples,
|
| 196 |
inputs=[video_query, video_upload]
|