Spaces:
Runtime error
Runtime error
acecalisto3
commited on
Commit
•
55f620f
1
Parent(s):
b26406c
Update app2.py
Browse files
app2.py
CHANGED
@@ -352,7 +352,17 @@ def signal_handler():
|
|
352 |
for task in asyncio.all_tasks():
|
353 |
task.cancel()
|
354 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
if __name__ == "__main__":
|
356 |
-
|
357 |
-
signal.signal(signal.SIGTERM, signal_handler)
|
358 |
-
asyncio.run(main())
|
|
|
352 |
for task in asyncio.all_tasks():
|
353 |
task.cancel()
|
354 |
|
355 |
+
return f"Processed: {input_text}"
|
356 |
+
|
357 |
+
# Create Gradio interface
|
358 |
+
with gr.Blocks() as demo:
|
359 |
+
gr.Markdown("# My Gradio App")
|
360 |
+
input_text = gr.Textbox(label="Input Text")
|
361 |
+
output_text = gr.Textbox(label="Output Text")
|
362 |
+
submit_button = gr.Button("Submit")
|
363 |
+
|
364 |
+
submit_button.click(fn=generate, inputs=input_text, outputs=output_text)
|
365 |
+
|
366 |
+
# Launch the app
|
367 |
if __name__ == "__main__":
|
368 |
+
demo.launch(share=True)
|
|
|
|