Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,7 @@ def greet3(x, progress=gr.Progress()):
|
|
| 33 |
time.sleep(1)
|
| 34 |
for i in progress.tqdm(range(100)):
|
| 35 |
time.sleep(0.1)
|
| 36 |
-
return
|
| 37 |
|
| 38 |
print("1:", os.path.dirname(__file__))
|
| 39 |
print("2:", os.path.join(os.path.dirname(__file__), "example/test.mp4") )
|
|
@@ -42,13 +42,13 @@ print("2:", os.path.join(os.path.dirname(__file__), "example/test.mp4") )
|
|
| 42 |
with gr.Blocks() as demo:
|
| 43 |
with gr.Row():
|
| 44 |
#input = gr.Video()
|
| 45 |
-
input = gr.Textbox()
|
| 46 |
-
output = gr.Textbox(
|
| 47 |
btn = gr.Button(value="Submit")
|
| 48 |
btn.click(greet3, inputs=input, outputs=output)
|
| 49 |
|
| 50 |
gr.Examples(
|
| 51 |
-
examples=[
|
| 52 |
inputs=input,
|
| 53 |
outputs=output,
|
| 54 |
fn=greet3,
|
|
|
|
| 33 |
time.sleep(1)
|
| 34 |
for i in progress.tqdm(range(100)):
|
| 35 |
time.sleep(0.1)
|
| 36 |
+
return x
|
| 37 |
|
| 38 |
print("1:", os.path.dirname(__file__))
|
| 39 |
print("2:", os.path.join(os.path.dirname(__file__), "example/test.mp4") )
|
|
|
|
| 42 |
with gr.Blocks() as demo:
|
| 43 |
with gr.Row():
|
| 44 |
#input = gr.Video()
|
| 45 |
+
input = [gr.Textbox()]
|
| 46 |
+
output = [gr.Textbox()]
|
| 47 |
btn = gr.Button(value="Submit")
|
| 48 |
btn.click(greet3, inputs=input, outputs=output)
|
| 49 |
|
| 50 |
gr.Examples(
|
| 51 |
+
examples=[["qweasd"]],
|
| 52 |
inputs=input,
|
| 53 |
outputs=output,
|
| 54 |
fn=greet3,
|