Spaces:
Runtime error
Runtime error
ngthanhtinqn
commited on
Commit
β’
d7199ef
1
Parent(s):
accbb3c
add requirements
Browse files- app.py +1 -1
- requirements.txt +9 -0
app.py
CHANGED
@@ -7,7 +7,7 @@ from transformers import OwlViTProcessor, OwlViTForObjectDetection
|
|
7 |
|
8 |
# Use GPU if available
|
9 |
if torch.cuda.is_available():
|
10 |
-
device = torch.device("cuda")
|
11 |
else:
|
12 |
device = torch.device("cpu")
|
13 |
|
|
|
7 |
|
8 |
# Use GPU if available
|
9 |
if torch.cuda.is_available():
|
10 |
+
device = torch.device("cuda:4")
|
11 |
else:
|
12 |
device = torch.device("cpu")
|
13 |
|
requirements.txt
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch
|
2 |
+
torchvision
|
3 |
+
transformers
|
4 |
+
numpy
|
5 |
+
matplotlib
|
6 |
+
torchmetrics
|
7 |
+
opencv-python
|
8 |
+
datasets # huggingface dataset
|
9 |
+
git+https://github.com/facebookresearch/segment-anything.git
|