Spaces:
Runtime error
Runtime error
nroggendorff
commited on
Commit
•
91db039
1
Parent(s):
1261010
Update app.py
Browse files
app.py
CHANGED
@@ -101,4 +101,26 @@ async def process_mention(message):
|
|
101 |
print(content)
|
102 |
print(response)
|
103 |
|
104 |
-
client.run(TOKEN)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
print(content)
|
102 |
print(response)
|
103 |
|
104 |
+
client.run(TOKEN)
|
105 |
+
|
106 |
+
messages = []
|
107 |
+
|
108 |
+
def refresh(new_message, markdown_text):
|
109 |
+
global messages
|
110 |
+
messages.append(new_message)
|
111 |
+
display_text = "\n".join(messages)
|
112 |
+
return display_text, markdown_text
|
113 |
+
|
114 |
+
with gr.Blocks() as demo:
|
115 |
+
with gr.Row():
|
116 |
+
message_input = gr.Textbox(label="Your Message", placeholder="Type your message here...")
|
117 |
+
|
118 |
+
display_area = gr.Textbox(label="Messages", interactive=False)
|
119 |
+
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!")
|
120 |
+
|
121 |
+
submit_button = gr.Button("Send")
|
122 |
+
|
123 |
+
submit_button.click(refresh, inputs=[message_input], outputs=[display_area])
|
124 |
+
|
125 |
+
# Launch the app
|
126 |
+
demo.launch()
|