hysts HF staff commited on
Commit
c59e591
·
1 Parent(s): 14d489a
Files changed (1) hide show
  1. app.py +7 -11
app.py CHANGED
@@ -9,17 +9,13 @@ import pathlib
9
  import subprocess
10
  import tarfile
11
 
12
- try:
13
- import detectron2
14
- except:
15
- command = 'pip install git+https://github.com/facebookresearch/[email protected]'
16
- subprocess.call(command.split())
17
-
18
- try:
19
- import adet
20
- except:
21
- command = 'pip install git+https://github.com/aim-uofa/AdelaiDet@7bf9d87'
22
- subprocess.call(command.split())
23
 
24
  import gradio as gr
25
  import huggingface_hub
 
9
  import subprocess
10
  import tarfile
11
 
12
+ if os.environ.get('SYSTEM') == 'spaces':
13
+ subprocess.call(
14
+ 'pip install git+https://github.com/facebookresearch/[email protected]'.
15
+ split())
16
+ subprocess.call(
17
+ 'pip install git+https://github.com/aim-uofa/AdelaiDet@7bf9d87'.split(
18
+ ))
 
 
 
 
19
 
20
  import gradio as gr
21
  import huggingface_hub