Update app.py
Browse files
app.py
CHANGED
@@ -328,6 +328,58 @@ def create_app():
|
|
328 |
inputs=[genre, theme, length],
|
329 |
outputs=[]
|
330 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
|
332 |
gr.Markdown("""
|
333 |
## How to Use
|
|
|
328 |
inputs=[genre, theme, length],
|
329 |
outputs=[]
|
330 |
)
|
331 |
+
|
332 |
+
# Add accordions with option explanations
|
333 |
+
with gr.Accordion("📝 Understanding Story Options", open=False):
|
334 |
+
with gr.Accordion("Genre Options", open=False):
|
335 |
+
gr.Markdown("""
|
336 |
+
**Genre** determines the type and style of your story:
|
337 |
+
|
338 |
+
- **Fantasy**: Stories with magic, mythical creatures, or supernatural elements (like Harry Potter or Lord of the Rings)
|
339 |
+
- **Science Fiction**: Stories involving futuristic technology, space travel, or scientific concepts
|
340 |
+
- **Mystery**: Stories centered around solving a crime or puzzle
|
341 |
+
- **Romance**: Stories focusing on relationships and love
|
342 |
+
- **Horror**: Stories designed to frighten or disturb the reader
|
343 |
+
- **Adventure**: Stories with exciting journeys, quests, or challenges
|
344 |
+
- **Historical Fiction**: Stories set in the past with historically accurate settings
|
345 |
+
- **Comedy**: Humorous stories meant to entertain and make readers laugh
|
346 |
+
""")
|
347 |
+
|
348 |
+
with gr.Accordion("Theme Suggestions", open=False):
|
349 |
+
gr.Markdown("""
|
350 |
+
**Theme** is the central idea or message that runs throughout your story. Some examples:
|
351 |
+
|
352 |
+
- **Redemption**: A character seeking forgiveness or making amends
|
353 |
+
- **Loss**: Dealing with grief or the absence of something important
|
354 |
+
- **Discovery**: Finding something new about oneself or the world
|
355 |
+
- **Adventure**: Exploring new places or situations
|
356 |
+
- **Coming of age**: A character maturing or growing up
|
357 |
+
- **Betrayal**: Dealing with trust being broken
|
358 |
+
- **Power**: The effects of gaining or losing control
|
359 |
+
- **Justice**: Exploring fairness and moral rights
|
360 |
+
- **Love**: Different types of relationships and connections
|
361 |
+
- **Identity**: Understanding who one truly is
|
362 |
+
""")
|
363 |
+
|
364 |
+
with gr.Accordion("Story Length Options", open=False):
|
365 |
+
gr.Markdown("""
|
366 |
+
**Story Length** determines the scope of your generated story:
|
367 |
+
|
368 |
+
- **Short Story**: A brief, self-contained narrative (typically 1,000-7,500 words) that can be read in one sitting
|
369 |
+
- **Novella**: A medium-length story (typically 17,500-40,000 words), longer than a short story but shorter than a novel
|
370 |
+
- **Novel Chapter**: A section of what could be a longer work, focusing on just one part of a potentially larger narrative
|
371 |
+
""")
|
372 |
+
|
373 |
+
with gr.Accordion("Interface Elements", open=False):
|
374 |
+
gr.Markdown("""
|
375 |
+
**Status**: Shows feedback about your story generation process (success messages, errors, confirmations)
|
376 |
+
|
377 |
+
**Story Branches**: When you click "Generate Branch Options," this area shows three different possible directions for your story. Each includes a title and brief description.
|
378 |
+
|
379 |
+
**Select a Branch**: Radio buttons that let you choose which story direction to follow. After selecting one, click "Continue with Selected Branch" to develop that storyline.
|
380 |
+
|
381 |
+
**Generated Story**: The main output area where your complete story appears, including all continuations and branches you've selected.
|
382 |
+
""")
|
383 |
|
384 |
gr.Markdown("""
|
385 |
## How to Use
|