HuguesHPI commited on
Commit
d26cc55
1 Parent(s): 508544b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import time
3
+
4
+ def slowly_reverse(word, progress=gr.Progress()):
5
+ progress(0, desc="Starting")
6
+ time.sleep(1)
7
+ progress(0.05)
8
+ new_string = ""
9
+ for letter in progress.tqdm(word, desc="Reversing"):
10
+ time.sleep(0.25)
11
+ new_string = letter + new_string
12
+ return new_string
13
+
14
+ demo = gr.Interface(slowly_reverse, gr.Text(), gr.Text())
15
+
16
+ demo.launch()