akhaliq HF staff commited on
Commit
330e9ae
1 Parent(s): ff8fe6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -1,5 +1,11 @@
1
  import os
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
 
 
 
 
 
 
3
  import gradio as gr
4
  # check pytorch installation:
5
  import torch, torchvision
 
1
  import os
2
  os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
3
+ os.system("git clone https://github.com/facebookresearch/Mask2Former.git")
4
+ os.chdir("Mask2Former")
5
+ os.system("pip install git+https://github.com/cocodataset/panopticapi.git")
6
+ os.chdir("mask2former/modeling/pixel_decoder/ops")
7
+ os.system("TORCH_CUDA_ARCH_LIST='8.0' FORCE_CUDA=1 python setup.py build install")
8
+ os.system("/home/user/app/Mask2Former")
9
  import gradio as gr
10
  # check pytorch installation:
11
  import torch, torchvision