Spaces:
Runtime error
Runtime error
Diego Fernandez
commited on
Commit
·
0e4e36a
1
Parent(s):
0993fd4
chore: add examples
Browse files
app.py
CHANGED
@@ -27,6 +27,15 @@ slide_threshold = gr.Slider(minimum=0, maximum=1, value=0.25, label="Model confi
|
|
27 |
|
28 |
output_component = "playablevideo"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
iface = gr.Interface(
|
31 |
fn=inference,
|
32 |
inputs=[
|
@@ -37,6 +46,7 @@ iface = gr.Interface(
|
|
37 |
slide_threshold,
|
38 |
],
|
39 |
outputs=output_component,
|
|
|
40 |
)
|
41 |
|
42 |
iface.launch()
|
|
|
27 |
|
28 |
output_component = "playablevideo"
|
29 |
|
30 |
+
examples_folder = "examples"
|
31 |
+
examples_list = []
|
32 |
+
|
33 |
+
if os.path.isdir(examples_folder):
|
34 |
+
for file in os.listdir(examples_folder):
|
35 |
+
path = examples_folder + "/" + file
|
36 |
+
examples_list.append([path])
|
37 |
+
|
38 |
+
|
39 |
iface = gr.Interface(
|
40 |
fn=inference,
|
41 |
inputs=[
|
|
|
46 |
slide_threshold,
|
47 |
],
|
48 |
outputs=output_component,
|
49 |
+
examples=examples_list,
|
50 |
)
|
51 |
|
52 |
iface.launch()
|