Spaces:
Runtime error
Runtime error
ManishThota
commited on
Commit
•
60a8041
1
Parent(s):
6ee5519
Update app.py
Browse files
app.py
CHANGED
@@ -36,6 +36,9 @@ screen = gr.Checkbox(label="Screen Interaction")
|
|
36 |
video_description = gr.Textbox(label="Video Description", show_label=True, show_copy_button=True)
|
37 |
json_output = gr.JSON(label="JSON Output")
|
38 |
|
|
|
|
|
|
|
39 |
# Examples for the interface
|
40 |
examples = [
|
41 |
["videos/2016-01-01_0100_US_KNBC_Channel_4_News_1867.16-1871.38_now.mp4",],
|
@@ -73,4 +76,12 @@ interface = gr.Interface(
|
|
73 |
theme=custom_theme,
|
74 |
allow_flagging="never",
|
75 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
interface.launch(debug=False)
|
|
|
36 |
video_description = gr.Textbox(label="Video Description", show_label=True, show_copy_button=True)
|
37 |
json_output = gr.JSON(label="JSON Output")
|
38 |
|
39 |
+
# Button to trigger JSON processing
|
40 |
+
process_json_button = gr.Button("Process JSON")
|
41 |
+
|
42 |
# Examples for the interface
|
43 |
examples = [
|
44 |
["videos/2016-01-01_0100_US_KNBC_Channel_4_News_1867.16-1871.38_now.mp4",],
|
|
|
76 |
theme=custom_theme,
|
77 |
allow_flagging="never",
|
78 |
)
|
79 |
+
|
80 |
+
# Button click event to process JSON
|
81 |
+
process_json_button.click(
|
82 |
+
fn=process_and_display_json,
|
83 |
+
inputs=video_description, # Take video description as input
|
84 |
+
outputs=json_output
|
85 |
+
)
|
86 |
+
|
87 |
interface.launch(debug=False)
|