Spaces:
Runtime error
Runtime error
letao670982
commited on
Commit
•
9e8f70b
1
Parent(s):
11e6686
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import gradio as gr
|
|
2 |
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer
|
3 |
from threading import Thread
|
4 |
|
5 |
-
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-
|
6 |
-
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-
|
7 |
|
8 |
streamer = TextStreamer(tokenizer, skip_prompt=True)
|
9 |
|
|
|
2 |
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer
|
3 |
from threading import Thread
|
4 |
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-1.3b-instruct", trust_remote_code=True)
|
6 |
+
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-1.3b-instruct", trust_remote_code=True, device_map="auto")
|
7 |
|
8 |
streamer = TextStreamer(tokenizer, skip_prompt=True)
|
9 |
|