Vitrous commited on
Commit
dc2947e
·
verified ·
1 Parent(s): a330154

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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
- # Extract the assistant's reply
68
- assistant_reply = generated_response.split('\n')[1]
69
 
70
- return {"user": prompt, "assistant": generated_response}
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: