MattyWhite commited on
Commit
9a28f36
·
verified ·
1 Parent(s): 2e5f98f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,6 +4,7 @@ import torch
4
  import cv2
5
  import numpy as np
6
  from PIL import Image
 
7
  import detectron2
8
  from detectron2.utils.logger import setup_logger
9
  from detectron2.engine import DefaultPredictor
@@ -15,13 +16,13 @@ from centernet.config import add_centernet_config
15
  from detic.config import add_detic_config
16
  from detic.modeling.utils import reset_cls_test
17
  from pydantic import BaseModel, Field, PydanticUserError
18
- cmd1 = "pip -m pip install 'torch'"
19
 
20
  # cmd0 = "pip -m pip install 'https://github.com/facebookresearch/detectron2.git@5aeb252b194b93dc2879b4ac34bc51a31b5aee13'"
21
  #cmd0 = "python -m pip install 'git+https://github.com/facebookresearch/detectron2.git@5aeb252b194b93dc2879b4ac34bc51a31b5aee13'"
22
  # cmd0 = "python -m pip install 'https://github.com/facebookresearch/detectron2.git'"
23
  #os.system(cmd0)
24
- os.system(cmd1)
25
 
26
  class BaseModelWithA(BaseModel):
27
  a: float
 
4
  import cv2
5
  import numpy as np
6
  from PIL import Image
7
+ os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
8
  import detectron2
9
  from detectron2.utils.logger import setup_logger
10
  from detectron2.engine import DefaultPredictor
 
16
  from detic.config import add_detic_config
17
  from detic.modeling.utils import reset_cls_test
18
  from pydantic import BaseModel, Field, PydanticUserError
19
+ #cmd1 = "pip -m pip install 'torch'"
20
 
21
  # cmd0 = "pip -m pip install 'https://github.com/facebookresearch/detectron2.git@5aeb252b194b93dc2879b4ac34bc51a31b5aee13'"
22
  #cmd0 = "python -m pip install 'git+https://github.com/facebookresearch/detectron2.git@5aeb252b194b93dc2879b4ac34bc51a31b5aee13'"
23
  # cmd0 = "python -m pip install 'https://github.com/facebookresearch/detectron2.git'"
24
  #os.system(cmd0)
25
+ #os.system(cmd1)
26
 
27
  class BaseModelWithA(BaseModel):
28
  a: float