Spaces:
Runtime error
Runtime error
Commit
ยท
d5ac253
1
Parent(s):
4129349
Broke it
Browse files
app.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
count = 0
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
def party(str_1, str_2, str_3):
|
| 7 |
+
if count % 3 == 0:
|
| 8 |
+
return str_1, "Blocks Party ๐ " + str_3, "Blocks Party ๐ " + str_2
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
with gr.Blocks() as demo:
|
| 12 |
+
text_1 = gr.component("textarea")
|
| 13 |
+
text_2 = gr.component("textarea")
|
| 14 |
+
text_3 = gr.component("textarea")
|
| 15 |
+
|
| 16 |
+
text_1.change(party, [text_1, text_2, text_3], [text_1, text_2, text_3])
|
| 17 |
+
text_2.change(party, [text_2, text_1, text_3], [text_2, text_1, text_3])
|
| 18 |
+
text_3.change(party, [text_3, text_1, text_2], [text_3, text_1, text_2])
|
| 19 |
+
|
| 20 |
+
demo.launch()
|