Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def generate(prompt, chat_history):
|
|
26 |
final_prompt += "User: " + prompt + "\n"
|
27 |
final_prompt += "Output:"
|
28 |
|
29 |
-
generated_text = phi2(final_prompt, max_length=
|
30 |
response = generated_text.split("Output:")[1].split("User:")[0]
|
31 |
|
32 |
if "Assistant:" in response:
|
|
|
26 |
final_prompt += "User: " + prompt + "\n"
|
27 |
final_prompt += "Output:"
|
28 |
|
29 |
+
generated_text = phi2(final_prompt, max_length=128)[0]["generated_text"]
|
30 |
response = generated_text.split("Output:")[1].split("User:")[0]
|
31 |
|
32 |
if "Assistant:" in response:
|