Spaces:
Sleeping
Sleeping
Rivalcoder
commited on
Commit
·
ab9e554
1
Parent(s):
d044a6c
Add New Version
Browse files- app.py +2 -1
- requirements.txt +9 -4
app.py
CHANGED
|
@@ -177,9 +177,10 @@ def gradio_interface():
|
|
| 177 |
# This function now accepts WebM files and other video formats.
|
| 178 |
return process_video(video_file)
|
| 179 |
|
|
|
|
| 180 |
interface = gr.Interface(
|
| 181 |
fn=process_gradio_video,
|
| 182 |
-
inputs=gr.
|
| 183 |
outputs="json"
|
| 184 |
)
|
| 185 |
|
|
|
|
| 177 |
# This function now accepts WebM files and other video formats.
|
| 178 |
return process_video(video_file)
|
| 179 |
|
| 180 |
+
# Change from gr.inputs.Video to gr.Video in Gradio 3.x
|
| 181 |
interface = gr.Interface(
|
| 182 |
fn=process_gradio_video,
|
| 183 |
+
inputs=gr.Video(type="file"), # 'file' ensures that Gradio handles all formats including WebM
|
| 184 |
outputs="json"
|
| 185 |
)
|
| 186 |
|
requirements.txt
CHANGED
|
@@ -1,7 +1,12 @@
|
|
| 1 |
-
|
| 2 |
-
gradio
|
| 3 |
torch
|
| 4 |
-
opencv-python
|
| 5 |
-
pillow
|
| 6 |
torchvision
|
|
|
|
|
|
|
| 7 |
uvicorn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ultralytics
|
|
|
|
| 2 |
torch
|
|
|
|
|
|
|
| 3 |
torchvision
|
| 4 |
+
gradio
|
| 5 |
+
fastapi
|
| 6 |
uvicorn
|
| 7 |
+
opencv-python
|
| 8 |
+
pillow
|
| 9 |
+
opencv-python-headless
|
| 10 |
+
numpy
|
| 11 |
+
pydantic
|
| 12 |
+
shutil
|