Spaces:
Sleeping
Sleeping
Update predict.py
Browse files- predict.py +1 -0
predict.py
CHANGED
@@ -4,6 +4,7 @@ import numpy as np
|
|
4 |
from PIL import Image
|
5 |
from collections import defaultdict
|
6 |
import os
|
|
|
7 |
# Mentioning detectron2 as a dependency directly in requirements.txt tries to install detectron2 before torch and results in an error even if torch is listed as a dependency before detectron2.
|
8 |
# Hence, installing detectron2 this way when using Gradio HF spaces.
|
9 |
os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
|
|
|
4 |
from PIL import Image
|
5 |
from collections import defaultdict
|
6 |
import os
|
7 |
+
import spaces
|
8 |
# Mentioning detectron2 as a dependency directly in requirements.txt tries to install detectron2 before torch and results in an error even if torch is listed as a dependency before detectron2.
|
9 |
# Hence, installing detectron2 this way when using Gradio HF spaces.
|
10 |
os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
|