Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,8 +33,13 @@ generator = pipeline(
|
|
33 |
)
|
34 |
|
35 |
def generate_reply(prompt):
|
36 |
-
full_prompt =
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
38 |
return result.split("Spartan Mentor:")[-1].strip()
|
39 |
|
40 |
iface = gr.Interface(
|
|
|
33 |
)
|
34 |
|
35 |
def generate_reply(prompt):
|
36 |
+
full_prompt = (
|
37 |
+
spartan_intro.strip() + "\n\n"
|
38 |
+
"The Spartan Mentor is ready to guide you.\n"
|
39 |
+
"User: " + prompt.strip() + "\n"
|
40 |
+
"Spartan Mentor:"
|
41 |
+
)
|
42 |
+
result = generator(full_prompt, max_length=300, num_return_sequences=1)[0]["generated_text"]
|
43 |
return result.split("Spartan Mentor:")[-1].strip()
|
44 |
|
45 |
iface = gr.Interface(
|