Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -110,9 +110,9 @@ def get_inference_prompt(messages, model_name):
|
|
110 |
prompt = ""
|
111 |
for message in messages :
|
112 |
if message["role"] == "user" :
|
113 |
-
prompt += f"Question: {message['content']}\n\nAnswer:
|
114 |
else : # message["role"] == "assistant"
|
115 |
-
prompt += f"{message['content']}\n\n"
|
116 |
return prompt
|
117 |
|
118 |
def generate(
|
|
|
110 |
prompt = ""
|
111 |
for message in messages :
|
112 |
if message["role"] == "user" :
|
113 |
+
prompt += f"Question: {message['content']}\n\nAnswer:"
|
114 |
else : # message["role"] == "assistant"
|
115 |
+
prompt += f" {message['content']}\n\n"
|
116 |
return prompt
|
117 |
|
118 |
def generate(
|