Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,21 +27,20 @@ def greet2(v):
|
|
| 27 |
print(ret)
|
| 28 |
return ret
|
| 29 |
|
| 30 |
-
demo = gr.Interface(
|
| 31 |
-
fn=greet,
|
| 32 |
-
inputs=gr.Video(),
|
| 33 |
-
outputs="text",
|
| 34 |
-
examples = "./example",
|
| 35 |
-
)
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
#gr.Interface(my_function, gr.Textbox(), gr.Textbox()).queue().launch()
|
|
|
|
| 27 |
print(ret)
|
| 28 |
return ret
|
| 29 |
|
| 30 |
+
#demo = gr.Interface(
|
| 31 |
+
# fn=greet,
|
| 32 |
+
# inputs=gr.Video(),
|
| 33 |
+
# outputs="text",
|
| 34 |
+
# examples = "./example",
|
| 35 |
+
#)
|
| 36 |
+
#demo.queue().launch(debug=True)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def my_function(x, progress=gr.Progress()):
|
| 41 |
+
progress(0, desc="Starting...")
|
| 42 |
+
time.sleep(1)
|
| 43 |
+
for i in progress.tqdm(range(100)):
|
| 44 |
+
time.sleep(0.1)
|
| 45 |
+
return x
|
| 46 |
+
gr.Interface(my_function, gr.Textbox(), gr.Textbox()).queue().launch()
|
|
|