Tonic commited on
Commit
5febbde
·
1 Parent(s): 3960c52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,7 +15,7 @@ model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen-7B-Chat", trust_remote_c
15
  def predict(input, history=[]):
16
  # tokenize the new input sentence
17
  new_user_input_ids = tokenizer.encode(
18
- input + tokenizer.eos_token, padding_side='left', return_tensors="pt"
19
  )
20
 
21
  # append the new user input tokens to the chat history
@@ -44,4 +44,4 @@ gr.Interface(
44
  inputs=["text", "state"],
45
  outputs=["chatbot", "state"],
46
  theme="ParityError/Anime",
47
- ).launch()
 
15
  def predict(input, history=[]):
16
  # tokenize the new input sentence
17
  new_user_input_ids = tokenizer.encode(
18
+ input + tokenizer.eos_token, return_tensors="pt"
19
  )
20
 
21
  # append the new user input tokens to the chat history
 
44
  inputs=["text", "state"],
45
  outputs=["chatbot", "state"],
46
  theme="ParityError/Anime",
47
+ ).launch(trust_remote_code=True)