Spaces:
Runtime error
Runtime error
Commit
•
a0eb96c
1
Parent(s):
8db08be
Update app.py
Browse files
app.py
CHANGED
@@ -112,17 +112,24 @@ with gr.Blocks() as demo:
|
|
112 |
with gr.Row():
|
113 |
message_input = gr.Textbox(label="Your Message", placeholder="Type your message here...")
|
114 |
|
115 |
-
display_area = gr.
|
116 |
markdown_area = gr.Markdown("# This app is community funded! Any message sent will appear everywhere. To help support more projects like this, my cash tag is $Noa087!")
|
117 |
|
118 |
submit_button = gr.Button("Send")
|
119 |
|
120 |
submit_button.click(refresh, inputs=[message_input], outputs=[display_area])
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
gradio_task = loop.run_in_executor(None, demo.launch)
|
125 |
|
126 |
-
|
|
|
127 |
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
with gr.Row():
|
113 |
message_input = gr.Textbox(label="Your Message", placeholder="Type your message here...")
|
114 |
|
115 |
+
display_area = gr.Text(label="Messages", interactive=False)
|
116 |
markdown_area = gr.Markdown("# This app is community funded! Any message sent will appear everywhere. To help support more projects like this, my cash tag is $Noa087!")
|
117 |
|
118 |
submit_button = gr.Button("Send")
|
119 |
|
120 |
submit_button.click(refresh, inputs=[message_input], outputs=[display_area])
|
121 |
|
122 |
+
def rungradio():
|
123 |
+
demo.launch()
|
|
|
124 |
|
125 |
+
def runclient():
|
126 |
+
client.run(TOKEN)
|
127 |
|
128 |
+
gradiotask = multiprocessing.Process(target=rungradio)
|
129 |
+
clienttask = multiprocessing.Process(target=runclient)
|
130 |
+
|
131 |
+
gradiotask.start()
|
132 |
+
clienttask.start()
|
133 |
+
|
134 |
+
gradiotask.join()
|
135 |
+
clienttask.join()
|