aliabid94 HF Staff commited on
Commit
c9cae8e
·
1 Parent(s): ec03eb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -17
app.py CHANGED
@@ -1,20 +1,8 @@
1
- import os
2
- from zipfile import ZipFile
3
  import gradio as gr
4
 
 
 
 
 
5
 
6
- def zip_files(files):
7
- raise gr.Error("asdf")
8
- with ZipFile("tmp.zip", "w") as zipObj:
9
- for idx, file in enumerate(files):
10
- zipObj.write(file.name, file.name.split("/")[-1])
11
- return "tmp.zip"
12
-
13
- with gr.Blocks() as demo:
14
- file = gr.Number()
15
- zipped = gr.File()
16
- file.change(zip_files, file, zipped)
17
-
18
-
19
- if __name__ == "__main__":
20
- demo.launch()
 
 
 
1
  import gradio as gr
2
 
3
+ def go(a):
4
+ import time
5
+ time.sleep(20)
6
+ return a
7
 
8
+ gr.Interface(go, "text", "text").launch()