Spaces:
Running
on
Zero
Running
on
Zero
chenlin
commited on
Commit
•
34ad2e0
1
Parent(s):
8ce49c8
update requirements
Browse files- app.py +1 -1
- requirements.txt +28 -13
app.py
CHANGED
@@ -7,7 +7,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
7 |
model_name = "Lin-Chen/ShareCaptioner"
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
9 |
model = AutoModelForCausalLM.from_pretrained(
|
10 |
-
model_name, device_map="
|
11 |
model.tokenizer = tokenizer
|
12 |
|
13 |
model.cuda()
|
|
|
7 |
model_name = "Lin-Chen/ShareCaptioner"
|
8 |
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
9 |
model = AutoModelForCausalLM.from_pretrained(
|
10 |
+
model_name, device_map="cpu", trust_remote_code=True).eval()
|
11 |
model.tokenizer = tokenizer
|
12 |
|
13 |
model.cuda()
|
requirements.txt
CHANGED
@@ -1,14 +1,29 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
spaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
torch==2.1.2
|
2 |
+
torchvision==0.16.2
|
3 |
+
transformers==4.37.2
|
4 |
+
tokenizers==0.15.1
|
5 |
+
sentencepiece==0.1.99
|
6 |
+
accelerate==0.21.0
|
7 |
+
peft
|
8 |
+
bitsandbytes
|
9 |
+
pydantic
|
10 |
+
markdown2[all]
|
11 |
+
numpy
|
12 |
+
scikit-learn==1.2.2
|
13 |
+
gradio==4.16.0
|
14 |
+
gradio_client==0.8.1
|
15 |
+
openai
|
16 |
spaces
|
17 |
+
requests
|
18 |
+
httpx==0.24.0
|
19 |
+
uvicorn
|
20 |
+
fastapi
|
21 |
+
decord
|
22 |
+
einops==0.6.1
|
23 |
+
einops-exts==0.0.4
|
24 |
+
timm==0.6.13
|
25 |
+
deepspeed==0.12.6
|
26 |
+
ninja
|
27 |
+
wandb
|
28 |
+
build
|
29 |
+
twine
|