Update app.py
Browse files
app.py
CHANGED
@@ -49,8 +49,9 @@ def respond(
|
|
49 |
for message in messages:
|
50 |
role = "<|assistant|>" if message['role'] == 'assistant' else "<|user|>"
|
51 |
prompt += f"\n{role}\n{message['content']}\n<|end|>\n"
|
52 |
-
|
53 |
-
|
|
|
54 |
# Generate the response
|
55 |
response_output = generator(
|
56 |
prompt,
|
@@ -67,6 +68,8 @@ def respond(
|
|
67 |
|
68 |
# Extract the assistant's response
|
69 |
result = generated_text[len(prompt):].strip()
|
|
|
|
|
70 |
except Exception as error:
|
71 |
result = str(error)
|
72 |
|
|
|
49 |
for message in messages:
|
50 |
role = "<|assistant|>" if message['role'] == 'assistant' else "<|user|>"
|
51 |
prompt += f"\n{role}\n{message['content']}\n<|end|>\n"
|
52 |
+
prompt += f"\n<|user|>\n{user_text}\n<|end|><|assistant|>\n"
|
53 |
+
|
54 |
+
"""
|
55 |
# Generate the response
|
56 |
response_output = generator(
|
57 |
prompt,
|
|
|
68 |
|
69 |
# Extract the assistant's response
|
70 |
result = generated_text[len(prompt):].strip()
|
71 |
+
"""
|
72 |
+
result = prompt
|
73 |
except Exception as error:
|
74 |
result = str(error)
|
75 |
|