Spaces:
Running
on
Zero
Running
on
Zero
Add generation prompt at end back in to prompt template
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ this demo is governed by the original [license](https://huggingface.co/spaces/hu
|
|
31 |
|
32 |
SYSTEM_PROMPT = "நீங்கள் உதவிகரமான மற்றும் மரியாதைக்குரிய மற்றும் நேர்மையான AI உதவியாளர்."
|
33 |
|
34 |
-
PROMPT_TEMPLATE = """## Instructions:\n{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + '\n' }}{% endif %}{% for message in messages %}{% if message['role'] == 'user' %}{{ '\n## Input:\n' + message['content'] + '\n'}}{% elif message['role'] == 'assistant' %}{{ '\n## Response:\n' + message['content'] + '\n'}}{% endif %}{% endfor %}"""
|
35 |
|
36 |
if not torch.cuda.is_available():
|
37 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|
|
|
31 |
|
32 |
SYSTEM_PROMPT = "நீங்கள் உதவிகரமான மற்றும் மரியாதைக்குரிய மற்றும் நேர்மையான AI உதவியாளர்."
|
33 |
|
34 |
+
PROMPT_TEMPLATE = """## Instructions:\n{% if messages[0]['role'] == 'system' %}{{ messages[0]['content'] + '\n' }}{% endif %}{% for message in messages %}{% if message['role'] == 'user' %}{{ '\n## Input:\n' + message['content'] + '\n'}}{% elif message['role'] == 'assistant' %}{{ '\n## Response:\n' + message['content'] + '\n'}}{% endif %}{% endfor %}\n\n## Response:\n"""
|
35 |
|
36 |
if not torch.cuda.is_available():
|
37 |
DESCRIPTION += "\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>"
|