Spaces:
Build error
Build error
app.py
CHANGED
@@ -75,7 +75,7 @@ def get_answers_timestamp(question, final_transcript, transcript):
|
|
75 |
return start_timestamp
|
76 |
|
77 |
|
78 |
-
def display_vid(url, question):
|
79 |
print("******** display_vid ********")
|
80 |
#https://www.youtube.com/watch?v=smUHQndcmOY&t=425s
|
81 |
#html = HTML("<iframe width='560' height='315' src='https://www.youtube.com/watch?v=smUHQndcmOY&t=425s' frameborder='0' allowfullscreen></iframe>")
|
@@ -97,9 +97,13 @@ def display_vid(url, question):
|
|
97 |
print(f"html output is : {html_out}")
|
98 |
|
99 |
sample_ques = set_example_question(question)
|
|
|
|
|
100 |
return html_out, sample_ques
|
101 |
|
102 |
-
def set_example_question(
|
|
|
|
|
103 |
return gr.Radio.update(value=example) #input_ques.update(example)
|
104 |
|
105 |
demo = gr.Blocks()
|
@@ -137,7 +141,7 @@ with demo:
|
|
137 |
#b2 = gr.Button("Generate Image")
|
138 |
|
139 |
#b1.click(display_vid, inputs=[input_url,input_ques], outputs=output_vid)
|
140 |
-
b1.click(display_vid, inputs=[input_url,example_question], outputs=[output_vid, input_ques])
|
141 |
#b2.click(poem_to_image, poem_txt, output_image)
|
142 |
#examples=examples
|
143 |
|
|
|
75 |
return start_timestamp
|
76 |
|
77 |
|
78 |
+
def display_vid(url, question, sample_question=None):
|
79 |
print("******** display_vid ********")
|
80 |
#https://www.youtube.com/watch?v=smUHQndcmOY&t=425s
|
81 |
#html = HTML("<iframe width='560' height='315' src='https://www.youtube.com/watch?v=smUHQndcmOY&t=425s' frameborder='0' allowfullscreen></iframe>")
|
|
|
97 |
print(f"html output is : {html_out}")
|
98 |
|
99 |
sample_ques = set_example_question(question)
|
100 |
+
print(f"Inside display_vid(), Sample Question coming from Radio box is : {sample_ques}")
|
101 |
+
|
102 |
return html_out, sample_ques
|
103 |
|
104 |
+
def set_example_question(sample_question):
|
105 |
+
print(f"******* Inside Sample Questions ********")
|
106 |
+
print(f"Sample Question coming from Radio box is : {sample_question}")
|
107 |
return gr.Radio.update(value=example) #input_ques.update(example)
|
108 |
|
109 |
demo = gr.Blocks()
|
|
|
141 |
#b2 = gr.Button("Generate Image")
|
142 |
|
143 |
#b1.click(display_vid, inputs=[input_url,input_ques], outputs=output_vid)
|
144 |
+
b1.click(display_vid, inputs=[input_url, input_ques, example_question], outputs=[output_vid, input_ques])
|
145 |
#b2.click(poem_to_image, poem_txt, output_image)
|
146 |
#examples=examples
|
147 |
|