Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -290,36 +290,36 @@ with gr.Blocks(title="Cosmos-Reason1", theme=gr.themes.Soft()) as demo:
|
|
290 |
outputs=[output, status]
|
291 |
)
|
292 |
|
293 |
-
# Example
|
294 |
-
|
295 |
[
|
296 |
-
"group_in_park.jpg",
|
297 |
"What is happening in this image?"
|
298 |
]
|
299 |
]
|
300 |
|
301 |
-
#
|
302 |
-
|
303 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
inputs=[image_input, text_input],
|
305 |
-
label="
|
|
|
306 |
)
|
307 |
|
308 |
-
#
|
309 |
-
|
310 |
-
|
311 |
-
inputs=[
|
312 |
-
|
313 |
-
|
314 |
-
text_input,
|
315 |
-
temperature,
|
316 |
-
top_p,
|
317 |
-
repetition_penalty,
|
318 |
-
max_tokens,
|
319 |
-
role_selector,
|
320 |
-
custom_role_text
|
321 |
-
],
|
322 |
-
outputs=[output, status]
|
323 |
)
|
324 |
|
325 |
if __name__ == "__main__":
|
|
|
290 |
outputs=[output, status]
|
291 |
)
|
292 |
|
293 |
+
# Example for image
|
294 |
+
image_examples = [
|
295 |
[
|
296 |
+
"group_in_park.jpg",
|
297 |
"What is happening in this image?"
|
298 |
]
|
299 |
]
|
300 |
|
301 |
+
# Example for video
|
302 |
+
video_examples = [
|
303 |
+
[
|
304 |
+
"car_curb_video.mp4",
|
305 |
+
"What is wrong in this video?"
|
306 |
+
]
|
307 |
+
]
|
308 |
+
|
309 |
+
# Image example block
|
310 |
+
gr.Examples(
|
311 |
+
examples=image_examples,
|
312 |
inputs=[image_input, text_input],
|
313 |
+
label="Image Example: click to load then hit Submit",
|
314 |
+
cache_examples="lazy"
|
315 |
)
|
316 |
|
317 |
+
# Video example block
|
318 |
+
gr.Examples(
|
319 |
+
examples=video_examples,
|
320 |
+
inputs=[video_input, text_input],
|
321 |
+
label="Video Exammple: click to load then hit Submit",
|
322 |
+
cache_examples="lazy"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
)
|
324 |
|
325 |
if __name__ == "__main__":
|