Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,8 @@ from Gradio_UI import GradioUI
|
|
| 12 |
def create_fantasy_story(heros_name: str, number_of_chapter: int) -> str:
|
| 13 |
"""A tool that generates a fantasy story based on a hero's name and a specified number of chapters.
|
| 14 |
Args:
|
| 15 |
-
|
| 16 |
-
|
| 17 |
"""
|
| 18 |
# Story templates for chapters
|
| 19 |
settings = [
|
|
@@ -35,8 +35,8 @@ def create_fantasy_story(heros_name: str, number_of_chapter: int) -> str:
|
|
| 35 |
"engaging in an epic battle that became legendary"
|
| 36 |
]
|
| 37 |
|
| 38 |
-
story = f"The Story of {
|
| 39 |
-
for i in range(1,
|
| 40 |
setting = random.choice(settings)
|
| 41 |
conflict = random.choice(conflicts)
|
| 42 |
resolution = random.choice(resolutions)
|
|
|
|
| 12 |
def create_fantasy_story(heros_name: str, number_of_chapter: int) -> str:
|
| 13 |
"""A tool that generates a fantasy story based on a hero's name and a specified number of chapters.
|
| 14 |
Args:
|
| 15 |
+
heros_name: The name of the hero or heroine.
|
| 16 |
+
number_of_chapter: The number of chapters in the story.
|
| 17 |
"""
|
| 18 |
# Story templates for chapters
|
| 19 |
settings = [
|
|
|
|
| 35 |
"engaging in an epic battle that became legendary"
|
| 36 |
]
|
| 37 |
|
| 38 |
+
story = f"The Story of {heros_name}:\n\n"
|
| 39 |
+
for i in range(1, number_of_chapter + 1):
|
| 40 |
setting = random.choice(settings)
|
| 41 |
conflict = random.choice(conflicts)
|
| 42 |
resolution = random.choice(resolutions)
|