Spaces:
Runtime error
Runtime error
Diego Fernandez
commited on
Commit
•
9beafe7
1
Parent(s):
985db4f
chore: fix examples
Browse files- .gitattributes +0 -2
- app.py +11 -17
- requirements.txt +1 -1
.gitattributes
CHANGED
@@ -30,5 +30,3 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
30 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
31 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
32 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
33 |
-
examples/norfair_demo.mp4 filter=lfs diff=lfs merge=lfs -text
|
34 |
-
examples/soccer.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
|
30 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
31 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
32 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
app.py
CHANGED
@@ -25,28 +25,22 @@ dd_track_points = gr.Dropdown(
|
|
25 |
|
26 |
slide_threshold = gr.Slider(minimum=0, maximum=1, value=0.25, label="Model confidence threshold")
|
27 |
|
28 |
-
|
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=[
|
42 |
input_video,
|
43 |
dd_model,
|
44 |
features,
|
45 |
dd_track_points,
|
46 |
slide_threshold,
|
47 |
-
]
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
)
|
51 |
|
52 |
iface.launch()
|
|
|
25 |
|
26 |
slide_threshold = gr.Slider(minimum=0, maximum=1, value=0.25, label="Model confidence threshold")
|
27 |
|
28 |
+
intput_components = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
input_video,
|
30 |
dd_model,
|
31 |
features,
|
32 |
dd_track_points,
|
33 |
slide_threshold,
|
34 |
+
]
|
35 |
+
|
36 |
+
output_components = "playablevideo"
|
37 |
+
|
38 |
+
example_list = [["examples/" + example] for example in os.listdir("examples")]
|
39 |
+
|
40 |
+
iface = gr.Interface(
|
41 |
+
fn=inference,
|
42 |
+
inputs=intput_components,
|
43 |
+
outputs=output_components,
|
44 |
)
|
45 |
|
46 |
iface.launch()
|
requirements.txt
CHANGED
@@ -6,5 +6,5 @@ rich==12.5.1
|
|
6 |
seaborn==0.12.0
|
7 |
opencv-python==4.6.0.66
|
8 |
git+https://github.com/tryolabs/norfair.git@master
|
9 |
-
gradio==3.
|
10 |
tqdm==4.64.1
|
|
|
6 |
seaborn==0.12.0
|
7 |
opencv-python==4.6.0.66
|
8 |
git+https://github.com/tryolabs/norfair.git@master
|
9 |
+
gradio==3.1.4
|
10 |
tqdm==4.64.1
|