Spaces:
Configuration error
Configuration error
englert
commited on
Commit
·
46955e6
1
Parent(s):
fae4d8b
update app.py #9
Browse files
app.py
CHANGED
@@ -75,23 +75,23 @@ def predict(input_file, downsample_size):
|
|
75 |
# all_selected_imgs_path = [join(selected_directory, f) for f in os.listdir(selected_directory) if
|
76 |
# isfile(join(selected_directory, f))]
|
77 |
|
78 |
-
zip_path = "asd.zip"
|
79 |
# zipf = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED)
|
80 |
# # for i, f in enumerate(all_selected_imgs_path):
|
81 |
# # zipf.write(f, basename(f))
|
82 |
# zipf.close()
|
83 |
# print("selected images zipped")
|
84 |
|
85 |
-
return
|
86 |
|
87 |
|
88 |
demo = gr.Interface(
|
89 |
enable_queue=True,
|
90 |
title="Frame selection by visual difference",
|
|
|
91 |
fn=predict,
|
92 |
inputs=[gr.inputs.Video(label="Upload Video File"),
|
93 |
gr.inputs.Number(label="Downsample size")],
|
94 |
outputs=gr.outputs.File(label="Zip"),
|
95 |
)
|
96 |
|
97 |
-
demo.launch(
|
|
|
75 |
# all_selected_imgs_path = [join(selected_directory, f) for f in os.listdir(selected_directory) if
|
76 |
# isfile(join(selected_directory, f))]
|
77 |
|
|
|
78 |
# zipf = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED)
|
79 |
# # for i, f in enumerate(all_selected_imgs_path):
|
80 |
# # zipf.write(f, basename(f))
|
81 |
# zipf.close()
|
82 |
# print("selected images zipped")
|
83 |
|
84 |
+
return input_file
|
85 |
|
86 |
|
87 |
demo = gr.Interface(
|
88 |
enable_queue=True,
|
89 |
title="Frame selection by visual difference",
|
90 |
+
description="",
|
91 |
fn=predict,
|
92 |
inputs=[gr.inputs.Video(label="Upload Video File"),
|
93 |
gr.inputs.Number(label="Downsample size")],
|
94 |
outputs=gr.outputs.File(label="Zip"),
|
95 |
)
|
96 |
|
97 |
+
demo.launch()
|