Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,8 @@ def greet(v, progress=gr.Progress(track_tqdm=True)):
|
|
| 18 |
for data in progress.tqdm(cuter.iter(v)):
|
| 19 |
ok, ret = mgr.recognize_image(data)
|
| 20 |
result.append(ret)
|
| 21 |
-
|
|
|
|
| 22 |
return None, result
|
| 23 |
|
| 24 |
def greet2(v, progress=gr.Progress(track_tqdm=True)):
|
|
@@ -37,13 +38,13 @@ with gr.Blocks() as demo:
|
|
| 37 |
]
|
| 38 |
btn = gr.Button(value="Submit")
|
| 39 |
|
| 40 |
-
btn.click(
|
| 41 |
|
| 42 |
gr.Examples(
|
| 43 |
examples=[os.path.join(os.path.dirname(__file__), "example/test.mp4")],
|
| 44 |
inputs=input,
|
| 45 |
outputs=output,
|
| 46 |
-
fn=
|
| 47 |
cache_examples=False,
|
| 48 |
)
|
| 49 |
demo.queue().launch(debug=True)
|
|
|
|
| 18 |
for data in progress.tqdm(cuter.iter(v)):
|
| 19 |
ok, ret = mgr.recognize_image(data)
|
| 20 |
result.append(ret)
|
| 21 |
+
print(type(data[0]))
|
| 22 |
+
yield data[0], ret
|
| 23 |
return None, result
|
| 24 |
|
| 25 |
def greet2(v, progress=gr.Progress(track_tqdm=True)):
|
|
|
|
| 38 |
]
|
| 39 |
btn = gr.Button(value="Submit")
|
| 40 |
|
| 41 |
+
btn.click(greet, inputs=input, outputs=output)
|
| 42 |
|
| 43 |
gr.Examples(
|
| 44 |
examples=[os.path.join(os.path.dirname(__file__), "example/test.mp4")],
|
| 45 |
inputs=input,
|
| 46 |
outputs=output,
|
| 47 |
+
fn=greet,
|
| 48 |
cache_examples=False,
|
| 49 |
)
|
| 50 |
demo.queue().launch(debug=True)
|