Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
st.markdown("""
|
4 |
+
| Story | Outline |
|
5 |
+
|-------|---------|
|
6 |
+
| The Celestial Gatekeepers โ๏ธ๐๐ก๏ธ | <ul><li>Beginning: ๐ Stella, the starry-eyed guardian, and her celestial companions are tasked with protecting the universe from cosmic threats.</li><li>Middle: ๐๐ฟ As the team battles otherworldly foes, they must also confront their own inner demons and navigate the complex relationships within their ranks.</li><li>End: โ๏ธ๐ The Gatekeepers face a powerful and ancient force of darkness, ultimately triumphing and strengthening their bonds as a team.</li></ul> |
|
7 |
+
| The Children of the Forgotten Gods โก๐๐บ | <ul><li>Beginning: ๐บ In a world where the old gods have been forgotten, Theo the Thunder-Caller, Dara the Dragon-Tamer, and their band of misfits are chosen by fate to restore the legacy of the ancient deities.</li><li>Middle: ๐งโโ๏ธ๐ฉ๏ธ The group embarks on a series of perilous adventures, unearthing long-lost relics and rediscovering the powers of the gods.</li><li>End: โ๏ธ๐ They prevent the rise of a new dark power, restoring the gods' rightful place in the world and transforming it for the better.</li></ul> |
|
8 |
+
| The Time Weaver Chronicles โณ๐งโโ๏ธ๐ฐ๏ธ | <ul><li>Beginning: ๐ฐ๏ธ Tim the Time-Weaver, a sorcerer with the ability to travel through time, sets out on a mission to prevent a catastrophic event from occurring.</li><li>Middle: โ๐ As Tim unravels the mysteries of the past, present, and future, he encounters new friends, formidable enemies, and unexpected challenges.</li><li>End: ๐งโโ๏ธ๐ Tim ultimately averts the disaster, learning valuable lessons about the nature of time and the importance of living in the moment.</li></ul> |
|
9 |
+
| The Enchanted Forest Trilogy ๐ฒ๐ฆโจ | <ul><li>Beginning: ๐ณ๐ฆ In the hidden magical kingdom of the Enchanted Forest, a brave young elf named Elara must gather her friends to save their home from an evil sorceress.</li><li>Middle: ๐๐ As the group faces trials and tribulations, they discover the true power of friendship and the strength within themselves.</li><li>End: โ๏ธ๐ฎ Elara and her friends defeat the sorceress, restoring peace and harmony to the Enchanted Forest and its magical creatures.</li></ul> |
|
10 |
+
| The Cursed Kingdom ๐ฐ๐ป๐ฎ | <ul><li>Beginning: ๐๐ฒ In a once-prosperous realm now plagued by dark forces, a group of heroes led by the courageous knight Sir Rowan sets out to break the curse and restore the light.</li><li>Middle: ๐ฉ๏ธ๐ป As the heroes face daunting challenges and supernatural enemies, they uncover the hidden history of their kingdom and the true nature of the curse.</li><li>End: ๐ฐ๐ก The group defeats the source of the darkness, lifting the curse and bringing hope and prosperity back to the kingdom.</li></ul> |
|
11 |
+
""")
|
12 |
+
|
13 |
+
import streamlit as st
|
14 |
+
import random
|
15 |
+
import json
|
16 |
+
import graphviz as gv
|
17 |
+
|
18 |
+
stories = [
|
19 |
+
{
|
20 |
+
"title": "The Celestial Gatekeepers โ๏ธ๐๐ก๏ธ",
|
21 |
+
"outline": [
|
22 |
+
"๐ Stella, the starry-eyed guardian, and her celestial companions are tasked with protecting the universe from cosmic threats.",
|
23 |
+
"๐๐ฟ As the team battles otherworldly foes, they must also confront their own inner demons and navigate the complex relationships within their ranks.",
|
24 |
+
"โ๏ธ๐ The Gatekeepers face a powerful and ancient force of darkness, ultimately triumphing and strengthening their bonds as a team."
|
25 |
+
]
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"title": "The Children of the Forgotten Gods โก๐๐บ",
|
29 |
+
"outline": [
|
30 |
+
"๐บ In a world where the old gods have been forgotten, Theo the Thunder-Caller, Dara the Dragon-Tamer, and their band of misfits are chosen by fate to restore the legacy of the ancient deities.",
|
31 |
+
"๐งโโ๏ธ๐ฉ๏ธ The group embarks on a series of perilous adventures, unearthing long-lost relics and rediscovering the powers of the gods.",
|
32 |
+
"โ๏ธ๐ They prevent the rise of a new dark power, restoring the gods' rightful place in the world and transforming it for the better."
|
33 |
+
]
|
34 |
+
},
|
35 |
+
{
|
36 |
+
"title": "The Time Weaver Chronicles โณ๐งโโ๏ธ๐ฐ๏ธ",
|
37 |
+
"outline": [
|
38 |
+
"๐ฐ๏ธ Tim the Time-Weaver, a sorcerer with the ability to travel through time, sets out on a mission to prevent a catastrophic event from occurring.",
|
39 |
+
"โ๐ As Tim unravels the mysteries of the past, present, and future, he encounters new friends, formidable enemies, and unexpected challenges.",
|
40 |
+
"๐งโโ๏ธ๐ Tim ultimately averts the disaster, learning valuable lessons about the nature of time and the importance of living in the moment."
|
41 |
+
]
|
42 |
+
},
|
43 |
+
{
|
44 |
+
"title": "The Enchanted Forest Trilogy ๐ฒ๐ฆโจ",
|
45 |
+
"outline": [
|
46 |
+
"๐ณ๐ฆ In the hidden magical kingdom of the Enchanted Forest, a brave young elf named Elara must gather her friends to save their home from an evil sorceress.",
|
47 |
+
"๐๐ As the group faces trials and tribulations, they discover the true power of friendship and the strength within themselves.",
|
48 |
+
"โ๏ธ๐ฎ Elara and her friends defeat the sorceress, restoring peace and harmony to the Enchanted Forest and its magical creatures."
|
49 |
+
]
|
50 |
+
},
|
51 |
+
{
|
52 |
+
"title": "The Cursed Kingdom ๐ฐ๐ป๐ฎ",
|
53 |
+
"outline": [
|
54 |
+
"๐๐ฒ In a once-prosperous realm now plagued by dark forces, a group of heroes led by the courageous knight Sir Rowan sets out to break the curse and restore the light.",
|
55 |
+
"๐ฉ๏ธ๐ป As the heroes face daunting challenges and supernatural enemies, they uncover the hidden history of their kingdom and the true nature of the curse.",
|
56 |
+
"๐ฐ๐ก The group defeats the source of the darkness, lifting the curse and bringing hope and prosperity back to the kingdom."
|
57 |
+
]
|
58 |
+
}
|
59 |
+
]
|
60 |
+
|
61 |
+
def generate_graph(story):
|
62 |
+
g = gv.Digraph()
|
63 |
+
for i, part in enumerate(story["outline"]):
|
64 |
+
emojis = "".join(c for c in part if c in emoji.UNICODE_EMOJI_ENGLISH)
|
65 |
+
g.node(str(i), label=emojis)
|
66 |
+
|
67 |
+
if i > 0:
|
68 |
+
g.edge(str(i - 1), str(i))
|
69 |
+
|
70 |
+
return g
|