jersuxs commited on
Commit
c2d7c4b
·
verified ·
1 Parent(s): 9334e24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
3
 
4
  model_name = "deepseek-ai/DeepSeek-V3-Base"
5
  tokenizer = AutoTokenizer.from_pretrained(model_name)
6
- model = AutoModelForCausalLM.from_pretrained(model_name)
7
 
8
  st.title("DeepSeek Chatbot")
9
 
@@ -12,5 +12,5 @@ prompt = st.text_input("Enter your message:")
12
  if prompt:
13
  inputs = tokenizer.encode(prompt, return_tensors="pt")
14
  outputs = model.generate(inputs)
15
- response = tokenizer.decode(outputs[0])
16
  st.write(response)
 
3
 
4
  model_name = "deepseek-ai/DeepSeek-V3-Base"
5
  tokenizer = AutoTokenizer.from_pretrained(model_name)
6
+ model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
7
 
8
  st.title("DeepSeek Chatbot")
9
 
 
12
  if prompt:
13
  inputs = tokenizer.encode(prompt, return_tensors="pt")
14
  outputs = model.generate(inputs)
15
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
16
  st.write(response)