Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|
| 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)
|