Spaces:
Running
Running
Replace bloated requirements with minimal dependencies
Browse filesThe 400+ package requirements_manual.txt included packages like av
that need system libraries (FFmpeg) and aren't used by the app.
Install only the actually needed packages instead.
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def setup_deps():
|
|
| 27 |
run("pip install 'setuptools<81'") # pin setuptools to keep pkg_resources available
|
| 28 |
run("pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu")
|
| 29 |
run("pip install -e .", cwd="segment-anything-2")
|
| 30 |
-
run("pip install --
|
| 31 |
run("git lfs install && git lfs pull", cwd=".") # assuming checkpoints/mouse_yolo.pt is tracked
|
| 32 |
|
| 33 |
# Relaunch the script with an env flag to avoid looping
|
|
|
|
| 27 |
run("pip install 'setuptools<81'") # pin setuptools to keep pkg_resources available
|
| 28 |
run("pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu")
|
| 29 |
run("pip install -e .", cwd="segment-anything-2")
|
| 30 |
+
run("pip install gradio opencv-python-headless ultralytics matplotlib")
|
| 31 |
run("git lfs install && git lfs pull", cwd=".") # assuming checkpoints/mouse_yolo.pt is tracked
|
| 32 |
|
| 33 |
# Relaunch the script with an env flag to avoid looping
|