hysts commited on
Commit
41ba85c
1 Parent(s): 0ec1bb2
Files changed (2) hide show
  1. app.py +5 -2
  2. requirements.txt +1 -0
app.py CHANGED
@@ -10,8 +10,11 @@ import subprocess
10
  import gradio as gr
11
 
12
  if os.getenv('SYSTEM') == 'spaces':
13
- subprocess.run('pip uninstall -y mmcv-full'.split())
14
- subprocess.run('pip install mmcv-full==1.5.2'.split())
 
 
 
15
  with open('patch') as f:
16
  subprocess.run('patch -p1'.split(), cwd='Text2Human', stdin=f)
17
 
10
  import gradio as gr
11
 
12
  if os.getenv('SYSTEM') == 'spaces':
13
+ import mim
14
+
15
+ mim.uninstall('mmcv-full', confirm_yes=True)
16
+ mim.install('mmcv-full==1.5.2', is_yes=True)
17
+
18
  with open('patch') as f:
19
  subprocess.run('patch -p1'.split(), cwd='Text2Human', stdin=f)
20
 
requirements.txt CHANGED
@@ -3,6 +3,7 @@ lpips==0.1.4
3
  mmcv-full==1.5.2
4
  mmsegmentation==0.24.1
5
  numpy==1.22.3
 
6
  Pillow==9.1.1
7
  sentence-transformers==2.2.0
8
  tokenizers==0.12.1
3
  mmcv-full==1.5.2
4
  mmsegmentation==0.24.1
5
  numpy==1.22.3
6
+ openmim==0.1.5
7
  Pillow==9.1.1
8
  sentence-transformers==2.2.0
9
  tokenizers==0.12.1