Spaces:
Running
Running
zR
commited on
Commit
·
58bd064
1
Parent(s):
51544f0
test
Browse files- app.py +2 -2
- requirements.txt +15 -15
app.py
CHANGED
@@ -157,7 +157,7 @@ def stop_now():
|
|
157 |
|
158 |
def main():
|
159 |
parser = argparse.ArgumentParser(description="CogAgent Gradio Demo")
|
160 |
-
parser.add_argument("--model_dir", default="THUDM/
|
161 |
parser.add_argument("--format_key", default="action_op_sensitive", help="Key to select the prompt format.")
|
162 |
parser.add_argument("--platform", default="Mac", help="Platform information string.")
|
163 |
parser.add_argument("--output_dir", default="outputs", help="Directory to save annotated images.")
|
@@ -184,7 +184,7 @@ def main():
|
|
184 |
format_str = format_dict[args.format_key]
|
185 |
|
186 |
with gr.Blocks(analytics_enabled=False) as demo:
|
187 |
-
gr.HTML("<h1 align='center'>
|
188 |
gr.HTML(
|
189 |
"<p align='center' style='color:red;'>This Demo is for learning and communication purposes only. Users must assume responsibility for the risks associated with AI-generated planning and operations.</p>")
|
190 |
|
|
|
157 |
|
158 |
def main():
|
159 |
parser = argparse.ArgumentParser(description="CogAgent Gradio Demo")
|
160 |
+
parser.add_argument("--model_dir", default="THUDM/cogagent-9b-20241220", help="Path or identifier of the model.")
|
161 |
parser.add_argument("--format_key", default="action_op_sensitive", help="Key to select the prompt format.")
|
162 |
parser.add_argument("--platform", default="Mac", help="Platform information string.")
|
163 |
parser.add_argument("--output_dir", default="outputs", help="Directory to save annotated images.")
|
|
|
184 |
format_str = format_dict[args.format_key]
|
185 |
|
186 |
with gr.Blocks(analytics_enabled=False) as demo:
|
187 |
+
gr.HTML("<h1 align='center'>CogAgent-9B-20241220 Demo</h1>")
|
188 |
gr.HTML(
|
189 |
"<p align='center' style='color:red;'>This Demo is for learning and communication purposes only. Users must assume responsibility for the risks associated with AI-generated planning and operations.</p>")
|
190 |
|
requirements.txt
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
transformers
|
2 |
torch==2.2.0
|
3 |
torchvision
|
4 |
-
huggingface-hub
|
5 |
-
sentencepiece
|
6 |
-
jinja2
|
7 |
-
pydantic
|
8 |
-
timm
|
9 |
-
tiktoken
|
10 |
numpy==1.26.4
|
11 |
-
accelerate
|
12 |
-
sentence_transformers
|
13 |
-
gradio
|
14 |
-
openai
|
15 |
-
einops
|
16 |
-
pillow
|
17 |
-
sse-starlette
|
18 |
bitsandbytes>=0.43.2
|
19 |
-
spaces
|
|
|
1 |
+
transformers==4.47.0
|
2 |
torch==2.2.0
|
3 |
torchvision
|
4 |
+
huggingface-hub==0.25.1
|
5 |
+
sentencepiece==0.2.0
|
6 |
+
jinja2==3.1.4
|
7 |
+
pydantic==2.9.2
|
8 |
+
timm==1.0.9
|
9 |
+
tiktoken==0.8.0
|
10 |
numpy==1.26.4
|
11 |
+
accelerate==1.1.1
|
12 |
+
sentence_transformers==3.1.1
|
13 |
+
gradio==5.9.0
|
14 |
+
openai==1.57.0
|
15 |
+
einops==0.8.0
|
16 |
+
pillow==10.4.0
|
17 |
+
sse-starlette==2.1.3
|
18 |
bitsandbytes>=0.43.2
|
19 |
+
spaces==0.31.1
|