optimize_install

#7
by wenmengzhou - opened
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -15,9 +15,11 @@ from huggingface_hub import snapshot_download
15
  if os.getenv('SYSTEM') == 'spaces':
16
  subprocess.run(shlex.split('pip uninstall -y modelscope'))
17
  subprocess.run(
18
- shlex.split(
19
- 'pip install git+https://github.com/modelscope/modelscope@fe67395')
20
- )
 
 
21
 
22
  from modelscope.outputs import OutputKeys
23
  from modelscope.pipelines import pipeline
 
15
  if os.getenv('SYSTEM') == 'spaces':
16
  subprocess.run(shlex.split('pip uninstall -y modelscope'))
17
  subprocess.run(
18
+ shlex.split('git clone https://github.com/modelscope/modelscope'),
19
+ cwd='/tmp',
20
+ env={'GIT_LFS_SKIP_SMUDGE': '1'})
21
+ subprocess.run(shlex.split('git checkout fe67395'), cwd='/tmp/modelscope')
22
+ subprocess.run(shlex.split('pip install .'), cwd='/tmp/modelscope')
23
 
24
  from modelscope.outputs import OutputKeys
25
  from modelscope.pipelines import pipeline