Spaces:
Sleeping
Sleeping
Commit
·
92ea6c2
1
Parent(s):
c2722db
changed model
Browse files
app.py
CHANGED
|
@@ -4,8 +4,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, AutoModel
|
|
| 4 |
|
| 5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 6 |
|
| 7 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 8 |
-
model =
|
| 9 |
|
| 10 |
|
| 11 |
def chat(message,history):
|
|
|
|
| 4 |
|
| 5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 6 |
|
| 7 |
+
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b-int4", trust_remote_code=True)
|
| 8 |
+
model = AutoModel.from_pretrained("THUDM/chatglm2-6b-int4", trust_remote_code=True).float()
|
| 9 |
|
| 10 |
|
| 11 |
def chat(message,history):
|