akhaliq HF staff commited on
Commit
14a50a8
1 Parent(s): 24b1a7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -16
app.py CHANGED
@@ -1,28 +1,14 @@
1
  import gradio as gr
2
  import os
3
 
4
- os.system("wget https://lfs.aminer.cn/misc/cogvideo/cogvideo-stage1.zip")
5
-
6
-
7
- os.environ['NLAYERS'] = 48
8
- os.environ['NHIDDEN'] = 3072
9
- os.environ['NATT'] = 48
10
- os.environ['MAXSEQLEN'] = 1024
11
- os.environ['MPSIZE'] = 1
12
-
13
-
14
-
15
-
16
- os.environ['TEMP'] = 1.05
17
- os.environ['TOPK'] = 12
18
 
19
 
20
 
21
  os.environ['SAT_HOME'] = '/home/user/app/sharefs/cogview-new'
22
 
23
  def inference(text):
24
- os.system("""python cogvideo_pipeline.py --input-source interactive --output-path ./output --parallel-size 1 --both-stages --use-guidance-stage1 --guidance-alpha 3.0 --generate-frame-num 5 --tokenizer-type fake --mode inference --distributed-backend nccl --fp16 --model-parallel-size $MPSIZE --temperature $TEMP --coglm-temperature2 0.89 --top_k $TOPK --sandwich-ln --seed 1234 --num-workers 0 --batch-size 1 --max-inference-batch-size 1""")
25
- return "out/out.mp4"
26
 
27
  gr.Interface(inference,"text","video").launch()
28
 
 
1
  import gradio as gr
2
  import os
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
 
6
 
7
  os.environ['SAT_HOME'] = '/home/user/app/sharefs/cogview-new'
8
 
9
  def inference(text):
10
+ os.system("""bash ./scripts/inference_cogvideo_pipeline.sh""")
11
+ return "output/out.mp4"
12
 
13
  gr.Interface(inference,"text","video").launch()
14