update
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def chat(prompt):
|
|
| 22 |
|
| 23 |
if __name__ == '__main__':
|
| 24 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
| 25 |
-
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
| 26 |
model.eval()
|
| 27 |
iface = gr.Interface(fn=chat, inputs="text", outputs="text")
|
| 28 |
iface.launch()
|
|
|
|
| 22 |
|
| 23 |
if __name__ == '__main__':
|
| 24 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
|
| 25 |
+
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).float()
|
| 26 |
model.eval()
|
| 27 |
iface = gr.Interface(fn=chat, inputs="text", outputs="text")
|
| 28 |
iface.launch()
|