Spaces:
Build error
Build error
app.py
CHANGED
@@ -98,9 +98,9 @@ def display_vid(url, question, sample_question=None, example_video=None):
|
|
98 |
ans_timestamp, ans_timestamp_secondbest = get_answers_timestamp(question, final_transcript, transcript)
|
99 |
|
100 |
#created embedding width='560' height='315'
|
101 |
-
html_out = "<iframe width='
|
102 |
print(f"html output is : {html_out}")
|
103 |
-
html_out_secondbest = "<iframe width='
|
104 |
|
105 |
if question == '':
|
106 |
print(f"Inside display_vid(), Sample_Question coming from Radio box is BEFORE : {sample_question}")
|
@@ -133,12 +133,12 @@ with demo:
|
|
133 |
"""
|
134 |
)
|
135 |
with gr.Row():
|
136 |
-
input_url = gr.Textbox(label="Input a Youtube video link")
|
137 |
input_ques = gr.Textbox(label="Ask a Question")
|
138 |
|
139 |
with gr.Row():
|
140 |
-
output_vid = gr.HTML(label="Video
|
141 |
-
output_vid_secondbest = gr.HTML(label="Video
|
142 |
|
143 |
with gr.Row():
|
144 |
example_question = gr.Dropdown(
|
|
|
98 |
ans_timestamp, ans_timestamp_secondbest = get_answers_timestamp(question, final_transcript, transcript)
|
99 |
|
100 |
#created embedding width='560' height='315'
|
101 |
+
html_out = "<iframe width='730' height='400' src='https://www.youtube.com/embed/" + video_id + "?start=" + str(ans_timestamp) + "' title='YouTube video player' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>"
|
102 |
print(f"html output is : {html_out}")
|
103 |
+
html_out_secondbest = "<iframe width='730' height='400' src='https://www.youtube.com/embed/" + video_id + "?start=" + str(ans_timestamp_secondbest) + "' title='YouTube video player' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe>"
|
104 |
|
105 |
if question == '':
|
106 |
print(f"Inside display_vid(), Sample_Question coming from Radio box is BEFORE : {sample_question}")
|
|
|
133 |
"""
|
134 |
)
|
135 |
with gr.Row():
|
136 |
+
input_url = gr.Textbox(label="Input a Youtube video link")
|
137 |
input_ques = gr.Textbox(label="Ask a Question")
|
138 |
|
139 |
with gr.Row():
|
140 |
+
output_vid = gr.HTML(label="Video from timestamp 1", show_label=True)
|
141 |
+
output_vid_secondbest = gr.HTML(label="Video from timestamp 2", show_label=True)
|
142 |
|
143 |
with gr.Row():
|
144 |
example_question = gr.Dropdown(
|