Update app.py
Browse files
app.py
CHANGED
@@ -64,10 +64,9 @@ def generate_response(prompt: str) -> str:
|
|
64 |
# Generate the response
|
65 |
generated_response = pipe(prompt_template)[0]['generated_text']
|
66 |
|
67 |
-
|
68 |
-
assistant_reply = generated_response.split('\n')[1]
|
69 |
|
70 |
-
return {"user": prompt, "assistant":
|
71 |
|
72 |
|
73 |
def generate_prompt_response(persona_prompt: str, prompt: str) -> dict:
|
|
|
64 |
# Generate the response
|
65 |
generated_response = pipe(prompt_template)[0]['generated_text']
|
66 |
|
67 |
+
assistant_reply = generated_response.split('\n\n')[1]
|
|
|
68 |
|
69 |
+
return {"user": prompt, "assistant": assistant_reply}
|
70 |
|
71 |
|
72 |
def generate_prompt_response(persona_prompt: str, prompt: str) -> dict:
|