rashmi commited on
Commit
9324d64
1 Parent(s): 6062324

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -2,6 +2,9 @@ import os
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
3
 
4
  import gradio as gr
 
 
 
5
  # check pytorch installation:
6
  import torch, torchvision
7
  print(torch.__version__, torch.cuda.is_available())
@@ -12,7 +15,7 @@ import detectron2
12
  from detectron2.utils.logger import setup_logger
13
  # import some common libraries
14
  import numpy as np
15
- import os, json, cv2, random
16
  # import some common detectron2 utilities
17
  from detectron2 import model_zoo
18
  from detectron2.engine import DefaultPredictor
 
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
3
 
4
  import gradio as gr
5
+ import cv2
6
+ os.system('pip install torch==1.9.0 torchvision==0.10.0')
7
+
8
  # check pytorch installation:
9
  import torch, torchvision
10
  print(torch.__version__, torch.cuda.is_available())
 
15
  from detectron2.utils.logger import setup_logger
16
  # import some common libraries
17
  import numpy as np
18
+ import os, json, random
19
  # import some common detectron2 utilities
20
  from detectron2 import model_zoo
21
  from detectron2.engine import DefaultPredictor