omerXfaruq commited on
Commit
d5ac253
ยท
1 Parent(s): 4129349
Files changed (1) hide show
  1. app.py +20 -0
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()