zR commited on
Commit
128eee8
1 Parent(s): 81dc4d2

cogvideox yaml

Browse files
Files changed (3) hide show
  1. README.md +49 -0
  2. app.py +1 -1
  3. requirements.txt +1 -1
README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: CogVideoX-2B Huggingface Space
3
+ emoji: movie
4
+ sdk_version: 4.40.0
5
+ suggested_storage: large
6
+ app_port: 7860
7
+ suggested_hardware: a10g-large
8
+ preload_from_hub:
9
+ - THUDM/CogVideoX-2b
10
+ models: THUDM/CogVideoX-2b
11
+ sdk: gradio
12
+ python_version: 3.10
13
+ tags:
14
+ - cogvideox
15
+ - video-generation
16
+ - thudm
17
+ pinned: true
18
+ disable_embedding: false
19
+ ----
20
+ ## How to run this space
21
+
22
+ CogVideoX does not rely on any external API models.
23
+ However, during the training of CogVideoX, we used relatively long prompts. To enable users to achieve rendering with
24
+ shorter prompts, we integrated an LLM to refine the prompts for better results.
25
+ This step is not mandatory, but we recommend using an LLM to enhance the prompts.
26
+
27
+ ### Using with GLM-4 Model
28
+
29
+ ```shell
30
+ OPENAI_BASE_URL=https://open.bigmodel.cn/api/paas/v4/ OPENAI_API_KEY="ZHIPUAI_API_KEY" python gradio_demo.py
31
+ ```
32
+
33
+ ### Using with OpenAI GPT-4 Model
34
+
35
+ ```shell
36
+ OPENAI_API_KEY="OPENAI_API_KEY" python gradio_demo.py
37
+ ```
38
+
39
+ and change `app.py` here:
40
+
41
+ ```
42
+ model="glm-4-0520" # change to GPT-4o
43
+ ```
44
+
45
+ ### Not using LLM to refine prompts.
46
+
47
+ ```shell
48
+ python gradio_demo.py
49
+ ```
app.py CHANGED
@@ -185,4 +185,4 @@ with gr.Blocks() as demo:
185
  )
186
 
187
  if __name__ == "__main__":
188
- demo.launch(server_name="127.0.0.1", server_port=7870, share=True)
 
185
  )
186
 
187
  if __name__ == "__main__":
188
+ demo.launch(server_name="127.0.0.1", server_port=7860, share=True)
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- gradio>=4.40.0
2
  imageio-ffmpeg>=0.5.1
3
 
4
 
 
1
+ gradio==4.40.0
2
  imageio-ffmpeg>=0.5.1
3
 
4