Spaces:
Running
Running
realzliu
commited on
Commit
·
c9049cc
1
Parent(s):
45978fc
init
Browse files- app.py +2 -2
- requirements.txt +7 -4
app.py
CHANGED
|
@@ -32,8 +32,8 @@ def load_models():
|
|
| 32 |
segmenter = GenerativeSegmenter(
|
| 33 |
MODEL_PATH,
|
| 34 |
device_map=DEVICE,
|
| 35 |
-
min_pixels=
|
| 36 |
-
max_pixels=
|
| 37 |
)
|
| 38 |
|
| 39 |
print("Downloading and Loading SAM model...")
|
|
|
|
| 32 |
segmenter = GenerativeSegmenter(
|
| 33 |
MODEL_PATH,
|
| 34 |
device_map=DEVICE,
|
| 35 |
+
min_pixels=1024 * 28 * 28, # Reduced slightly for Space stability
|
| 36 |
+
max_pixels=1280 * 28 * 28
|
| 37 |
)
|
| 38 |
|
| 39 |
print("Downloading and Loading SAM model...")
|
requirements.txt
CHANGED
|
@@ -3,9 +3,12 @@ torchvision
|
|
| 3 |
transformers
|
| 4 |
accelerate
|
| 5 |
numpy
|
| 6 |
-
opencv-python
|
| 7 |
pillow
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
timm
|
| 11 |
-
|
|
|
|
|
|
| 3 |
transformers
|
| 4 |
accelerate
|
| 5 |
numpy
|
|
|
|
| 6 |
pillow
|
| 7 |
+
scikit-image
|
| 8 |
+
scipy
|
| 9 |
+
opencv-python
|
| 10 |
+
matplotlib
|
| 11 |
+
einops
|
| 12 |
timm
|
| 13 |
+
gradio
|
| 14 |
+
huggingface_hub
|