Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def generate(message: str,
|
|
40 |
|
41 |
# Prepare input for the model
|
42 |
conversation = [
|
43 |
-
{"role": "user", "content": f"Please translate the following into
|
44 |
]
|
45 |
input_ids = tokenizer.apply_chat_template(conversation, add_generation_prompt=True, return_tensors="pt")
|
46 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
|
|
40 |
|
41 |
# Prepare input for the model
|
42 |
conversation = [
|
43 |
+
{"role": "user", "content": f"Please translate the following into English: {message} Translation:"}
|
44 |
]
|
45 |
input_ids = tokenizer.apply_chat_template(conversation, add_generation_prompt=True, return_tensors="pt")
|
46 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|