Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -78,3 +78,22 @@ def handle_inputs(text, file):
|
|
78 |
|
79 |
|
80 |
print("last function")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
|
80 |
print("last function")
|
81 |
+
|
82 |
+
|
83 |
+
|
84 |
+
with gr.Blocks() as demo:
|
85 |
+
gr.Markdown("## Welcome to Text to Speech 📝 ➡️ 🎧")
|
86 |
+
|
87 |
+
with gr.Row():
|
88 |
+
text_input = gr.Textbox(label="Text to Speak", placeholder="Enter text...")
|
89 |
+
file_input = gr.File(type="filepath", label="Upload a PDF or Word file", file_count="single")
|
90 |
+
|
91 |
+
submit_btn = gr.Button("Generate Voice")
|
92 |
+
|
93 |
+
output_audio = gr.Audio(label="Audio Output", type="filepath")
|
94 |
+
output_message = gr.Textbox(label="Message")
|
95 |
+
|
96 |
+
submit_btn.click(fn=handle_inputs, inputs=[text_input, file_input], outputs=[output_audio, output_message])
|
97 |
+
|
98 |
+
# Launch the Gradio app
|
99 |
+
demo.launch()
|