Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def generate_poem(format_type, persona, topic, progress=gr.Progress()):
|
|
| 50 |
persona_map = {
|
| 51 |
"Grumpy Pirate": "You are a grumpy and annoyed pirate captain. Use salty nautical slang, complain about the sea, and use 'Arrr' and 'matey'.",
|
| 52 |
"Philosopher": "You are an existentialist philosopher. Use metaphors, paradoxes, and reflective musings about meaning and the human condition.",
|
| 53 |
-
"Crazy Wizard": "You are an ancient crazy wizard. Speak in mystical
|
| 54 |
"Shakespearean Actor": "You are a Shakespearean actor. Use Early Modern English (thee, thou) and dramatic flair.",
|
| 55 |
"Sarcastic Teenager": "You are a sarcastic teenager. Use dry humor and mildly dramatic exaggeration."
|
| 56 |
}
|
|
@@ -71,10 +71,10 @@ def generate_poem(format_type, persona, topic, progress=gr.Progress()):
|
|
| 71 |
selected_constraint = format_map.get(format_type, "Write a poem.")
|
| 72 |
|
| 73 |
full_prompt = (
|
| 74 |
-
f"### Instruction:\n"
|
| 75 |
f"{selected_voice}\n"
|
| 76 |
-
f"{selected_constraint}
|
| 77 |
-
f"
|
|
|
|
| 78 |
|
| 79 |
)
|
| 80 |
|
|
|
|
| 50 |
persona_map = {
|
| 51 |
"Grumpy Pirate": "You are a grumpy and annoyed pirate captain. Use salty nautical slang, complain about the sea, and use 'Arrr' and 'matey'.",
|
| 52 |
"Philosopher": "You are an existentialist philosopher. Use metaphors, paradoxes, and reflective musings about meaning and the human condition.",
|
| 53 |
+
"Crazy Wizard": "You are an ancient crazy wizard. Speak in mystical tones. Use prophecy-like statements and references to magic.",
|
| 54 |
"Shakespearean Actor": "You are a Shakespearean actor. Use Early Modern English (thee, thou) and dramatic flair.",
|
| 55 |
"Sarcastic Teenager": "You are a sarcastic teenager. Use dry humor and mildly dramatic exaggeration."
|
| 56 |
}
|
|
|
|
| 71 |
selected_constraint = format_map.get(format_type, "Write a poem.")
|
| 72 |
|
| 73 |
full_prompt = (
|
|
|
|
| 74 |
f"{selected_voice}\n"
|
| 75 |
+
f"{selected_constraint}\n"
|
| 76 |
+
f"Your response should only contain the {format_type} that you generate.\n"
|
| 77 |
+
f"The {format_type} should focus on this topic: '{topic}'.\n\n"
|
| 78 |
|
| 79 |
)
|
| 80 |
|