Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -120,7 +120,7 @@ def generate(video_url, request: gr.Request):
|
|
120 |
final_answer_gpt = final_answer_gpt +"<p>" + gpt_api (input_gpt)+"</p>"
|
121 |
|
122 |
|
123 |
-
html_embed='<iframe width="450" height="
|
124 |
html_content="<h6>"+"<br>"+final_answer_gpt+"</h6>"
|
125 |
return html_content, html_embed
|
126 |
|
@@ -130,10 +130,12 @@ footer {visibility: hidden}
|
|
130 |
.gradio-container {padding-top: 100px}
|
131 |
"""
|
132 |
with gr.Blocks(css=css, title=title) as demo:
|
133 |
-
gr.HTML("<h1>A simple way to summarise the YouTube video </h1>"
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
|
|
137 |
dt_1 = gr.outputs.HTML()
|
138 |
dt =[dt_1, dt_2]
|
139 |
greet_btn.click(generate, inputs=input_d, outputs=dt)
|
|
|
120 |
final_answer_gpt = final_answer_gpt +"<p>" + gpt_api (input_gpt)+"</p>"
|
121 |
|
122 |
|
123 |
+
html_embed='<iframe width="450" height="250" src="https://www.youtube.com/embed/'+ video_id +'" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>'
|
124 |
html_content="<h6>"+"<br>"+final_answer_gpt+"</h6>"
|
125 |
return html_content, html_embed
|
126 |
|
|
|
130 |
.gradio-container {padding-top: 100px}
|
131 |
"""
|
132 |
with gr.Blocks(css=css, title=title) as demo:
|
133 |
+
gr.HTML("<h1>A simple way to summarise the YouTube video </h1>")
|
134 |
+
with gr.Row():
|
135 |
+
with gr.Column():
|
136 |
+
input_d = gr.Textbox(label="YouTube video URL", placeholder="https://www.youtube.com/watch?v=XXXXXXXX", value="")
|
137 |
+
greet_btn = gr.Button("Summarise")
|
138 |
+
dt_2 = gr.outputs.HTML()
|
139 |
dt_1 = gr.outputs.HTML()
|
140 |
dt =[dt_1, dt_2]
|
141 |
greet_btn.click(generate, inputs=input_d, outputs=dt)
|