Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,8 +25,8 @@ def generatePrompt(prompt, promptdos):
|
|
| 25 |
"role": "system",
|
| 26 |
"content": "you are a chatbot who always responds politely and in the shortest possible way",
|
| 27 |
},
|
| 28 |
-
{"role": "user", "content": new_prompt},
|
| 29 |
-
{"role": "user", "content": promptdos},
|
| 30 |
]
|
| 31 |
# https://huggingface.co/docs/transformers/main/en/chat_templating
|
| 32 |
final_prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
|
|
| 25 |
"role": "system",
|
| 26 |
"content": "you are a chatbot who always responds politely and in the shortest possible way",
|
| 27 |
},
|
| 28 |
+
{"role": "user", "content": str(new_prompt)},
|
| 29 |
+
{"role": "user", "content": str(promptdos)},
|
| 30 |
]
|
| 31 |
# https://huggingface.co/docs/transformers/main/en/chat_templating
|
| 32 |
final_prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|