Install dependencies

#1
by hysts HF staff - opened
Files changed (2) hide show
  1. app.py +1 -3
  2. requirements.txt +3 -0
app.py CHANGED
@@ -1,5 +1,3 @@
1
- import os
2
- os.system("""pip install "modelscope[cv]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html""")
3
  import gradio as gr
4
  import cv2
5
  from modelscope.pipelines import pipeline
@@ -18,4 +16,4 @@ def inference(text):
18
 
19
  title = "chinese stable diffusion"
20
 
21
- gr.Interface(inference, "text","image", title=title).launch()
 
 
1
  import gradio as gr
2
  import cv2
3
  from modelscope.pipelines import pipeline
16
 
17
  title = "chinese stable diffusion"
18
 
19
+ gr.Interface(inference, "text","image", title=title).launch()
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ --extra-index-url https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
2
+ fairseq
3
+ modelscope[multi-modal]