Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,14 +25,15 @@ def process_url(url):
|
|
25 |
return audio_file, text
|
26 |
|
27 |
# Create Gradio interface
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
)
|
|
|
33 |
|
34 |
if __name__ == "__main__":
|
35 |
-
|
36 |
|
37 |
# Dependencies
|
38 |
# =============
|
|
|
25 |
return audio_file, text
|
26 |
|
27 |
# Create Gradio interface
|
28 |
+
with gr.Blocks() as demo:
|
29 |
+
url_input = gr.Textbox(lines=1, placeholder="Enter the URL of the webpage...")
|
30 |
+
audio_output = gr.Audio(label="Generated Speech")
|
31 |
+
text_output = gr.Textbox(lines=10, label="Extracted Text")
|
32 |
+
greet_btn = gr.Button("Submit")
|
33 |
+
greet_btn.click(fn=process_url, inputs=url_input, outputs=[audio_output, text_output])
|
34 |
|
35 |
if __name__ == "__main__":
|
36 |
+
demo.launch()
|
37 |
|
38 |
# Dependencies
|
39 |
# =============
|