Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
-
from transformers import AutoModel, AutoTokenizer
|
2 |
import gradio as gr
|
3 |
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
#tokenizer = AutoTokenizer.from_pretrained("silver/chatglm-6b-slim", trust_remote_code=True)
|
7 |
#model = AutoModel.from_pretrained("silver/chatglm-6b-slim", trust_remote_code=True).half().cuda()
|
8 |
|
|
|
1 |
+
#from transformers import AutoModel, AutoTokenizer
|
2 |
import gradio as gr
|
3 |
|
4 |
+
from transformers import AutoModelForSeq2SeqLM
|
5 |
+
|
6 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("silver/chatglm-6b-int4-qe-slim")
|
7 |
+
|
8 |
+
#tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
9 |
+
#model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).half().cuda()
|
10 |
#tokenizer = AutoTokenizer.from_pretrained("silver/chatglm-6b-slim", trust_remote_code=True)
|
11 |
#model = AutoModel.from_pretrained("silver/chatglm-6b-slim", trust_remote_code=True).half().cuda()
|
12 |
|