Spaces:
Sleeping
Sleeping
File size: 10,698 Bytes
1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 1c26e4c 1a70ad2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
import streamlit as st
import streamlit.components.v1 as components
import math
def main():
st.set_page_config(page_title="Storytelling Mastery", page_icon="๐", layout="wide")
st.title("๐ญ The Art of Storytelling: Master Guide ๐ญ")
# -----------------------------
# 1. The Storyteller's Song
# -----------------------------
st.markdown("## ๐ต The Storyteller's Journey Song ๐ต")
st.markdown("""
**Verse 1 โ Location**
*I'm in a quiet town, where twilight meets the dawn,*
*A simple street and weathered walls, where whispered dreams are drawn.*
**Verse 2 โ Actions**
*I lace my worn-out sneakers, stepping into a new dayโs light,*
*I pedal through cobbled memories, heart racing with each flight.*
**Verse 3 โ Thoughts**
*In every echo of my footsteps, a raw, unfiltered thought appears,*
*I muse, โAm I chasing shadows, or the brilliance of my years?โ*
**Verse 4 โ Emotions**
*My eyes reflect a storm of joy and painโa silent, candid art,*
*A trembling smile, a furrowed brow, emotions painted on my heart.*
**Verse 5 โ Dialogue**
*Then comes a gentle, piercing voice: โKeep moving, dare to feel;โ*
*Those words ignite the darkened skiesโmy destiny is real.*
**Chorus**
*Let each moment unfold its magic, in places, moves, and minds so bold,*
*For every whispered thought and burst of feeling tells a story yet untold.*
""")
st.markdown("---")
# -----------------------------
# 2. The Storytelling Points Outline
# -----------------------------
storytelling_points = [
{"number": 1, "emoji": "๐ ", "keyword": "location", "description": "Set a scene that sparks the imagination: a place that's simply stated but vividly felt."},
{"number": 2, "emoji": "๐", "keyword": "actions", "description": "Show the kinetic energyโwhether itโs walking, biking, or a spontaneous burst of movement."},
{"number": 3, "emoji": "๐ง ", "keyword": "thoughts", "description": "Reveal those raw, neurotic inner monologues that make you real and relatable."},
{"number": 4, "emoji": "๐ฒ", "keyword": "emotions", "description": "Let your body speak the language of your feelingsโevery twitch and tear is a story."},
{"number": 5, "emoji": "๐ฌ", "keyword": "dialogue", "description": "Capture crisp, memorable dialogue that slices through the moment like lightning."},
# Additional points can be used for further storytelling techniquesโฆ
]
# -----------------------------
# 3. Random Literary Wit โ Ten Poetic Lines
# -----------------------------
random_poetry = [
"๐
Location: Where the horizon kisses the edge of dreams. ๐",
"๐ด Action: Pedaling through the city's heartbeat, every turn a burst of rhythm. ๐ถ",
"๐ญ Thoughts: Whispering secrets of a chaotic mind under a tranquil sky. ๐",
"๐ Emotions: A smile that trembles like morning dew on a rose. ๐",
"๐ฃ Dialogue: Words crackling like fire in the midnight hush. ๐ฅ",
"๐ฒ Nature: The forest murmurs ancient tales to those who dare to listen. ๐",
"๐ Waves: Dancing to the eternal hymn of the deep blue. ๐",
"๐ Dreams: Starlight scattered over the canvas of restless nights. โจ",
"๐ฅ Passion: A flame burning fierce in the silence of despair. โค๏ธ",
"๐ Reflection: Leaves falling like whispered memories in autumnโs embrace. ๐๏ธ"
]
st.markdown("## โจ Random Literary Wit")
st.code("\n".join(random_poetry), language="python")
# -----------------------------
# 4. Interactive Story Element Explorer (Vertical Flow and Tabs)
# -----------------------------
st.markdown("## ๐ The Art of Storytelling: 5 Essential Elements")
st.markdown("> \"The universe is made of stories, not of atoms.\" โ Muriel Rukeyser")
for point in storytelling_points:
st.markdown(f"{point['number']}. {point['emoji']} **{point['keyword'].capitalize()}** - {point['description']}")
# -----------------------------
# 5. Star Layout for the Five Pillars
# -----------------------------
st.markdown("## โญ Five Pillars in a Star Layout โญ")
# Using absolute positioning in a relative container to arrange five points on a circle
# Calculated using basic trigonometry (center = 200, radius = 150)
star_html = """
<div style="position: relative; width: 400px; height: 400px; margin: auto; border: 1px dashed #aaa; border-radius: 50%;">
<!-- Point 1: Location at angle 90ยฐ -->
<div style="position: absolute; top: 50px; left: 200px; transform: translate(-50%, -50%); text-align: center;">
<div style="font-size: 2em;">๐ </div>
<div><b>Location</b></div>
</div>
<!-- Point 2: Actions at angle ~162ยฐ -->
<div style="position: absolute; top: 154px; left: 57px; transform: translate(-50%, -50%); text-align: center;">
<div style="font-size: 2em;">๐</div>
<div><b>Actions</b></div>
</div>
<!-- Point 3: Thoughts at angle ~234ยฐ -->
<div style="position: absolute; top: 321px; left: 112px; transform: translate(-50%, -50%); text-align: center;">
<div style="font-size: 2em;">๐ง </div>
<div><b>Thoughts</b></div>
</div>
<!-- Point 4: Emotions at angle ~306ยฐ -->
<div style="position: absolute; top: 321px; left: 288px; transform: translate(-50%, -50%); text-align: center;">
<div style="font-size: 2em;">๐ฒ</div>
<div><b>Emotions</b></div>
</div>
<!-- Point 5: Dialogue at angle ~18ยฐ -->
<div style="position: absolute; top: 154px; left: 343px; transform: translate(-50%, -50%); text-align: center;">
<div style="font-size: 2em;">๐ฌ</div>
<div><b>Dialogue</b></div>
</div>
</div>
"""
components.html(star_html, height=450)
# -----------------------------
# 6. Additional Interactive Elements (Tabs & Dropdown)
# -----------------------------
tab1, tab2, tab3 = st.tabs(["Vertical Flow", "Circular Layout", "Categorical Groups"])
with tab1:
st.markdown("### Vertical Flow Diagram")
mermaid_vertical = generate_vertical_diagram(storytelling_points)
st.markdown(mermaid_vertical, unsafe_allow_html=True)
with tab2:
st.markdown("### Circular Storytelling Process")
mermaid_circular = generate_circular_diagram(storytelling_points)
st.markdown(mermaid_circular, unsafe_allow_html=True)
with tab3:
st.markdown("### Categorical Groups")
mermaid_categories = generate_categorical_diagram(storytelling_points)
st.markdown(mermaid_categories, unsafe_allow_html=True)
st.markdown("## ๐ Explore Individual Storytelling Elements")
col1, col2 = st.columns([1, 3])
with col1:
options = [f"{point['number']}. {point['emoji']} {point['keyword'].capitalize()}" for point in storytelling_points]
selected_option = st.selectbox("Select an element to explore:", options)
selected_number = int(selected_option.split('.')[0])
selected_point = next(point for point in storytelling_points if point['number'] == selected_number)
with col2:
st.markdown(f"### {selected_option}")
st.markdown(f"**Description:** {selected_point['description']}")
examples = {
1: "'In the stillness of a small town, I take in the crisp air...'",
2: "'I lace up my sneakers and step boldly into the unknown, each stride a heartbeat.'",
3: "'I muse: What if these fleeting moments are the stitches of my very soul?'",
4: "'My eyes shimmer with unspoken stories, my face a canvas of turbulent joy.'",
5: "'Then, a voice cuts through the silence: โKeep pushing, the dawn awaits!โ'"
}
st.markdown(f"**Example:** {examples.get(selected_number, 'No example available.')}")
st.markdown("> \"There is no greater agony than bearing an untold story inside you.\" โ Maya Angelou")
def generate_vertical_diagram(points):
"""Generate a vertical flow Mermaid diagram"""
nodes = []
connections = []
styles = []
for i, point in enumerate(points):
node_id = point['number']
node_label = f"{node_id}. {point['emoji']} {point['keyword'].capitalize()}"
nodes.append(f" {node_id}(\"{node_label}\")")
if i < len(points) - 1:
connections.append(f" {node_id} --> {points[i+1]['number']}")
else:
connections.append(f" {node_id} --> {points[0]['number']}")
styles.extend([
" %% Style definitions",
" classDef foundation fill:#ff9900,stroke:#333,stroke-width:2px,color:#000;",
" classDef technique fill:#66cc99,stroke:#333,stroke-width:2px,color:#000;",
" classDef learning fill:#6699cc,stroke:#333,stroke-width:2px,color:#000;",
" classDef mastery fill:#cc6699,stroke:#333,stroke-width:2px,color:#000;",
" class 1,2,3,4,5 foundation;"
])
diagram = ["```mermaid", "graph TD"]
diagram.extend(nodes)
diagram.extend(connections)
diagram.extend(styles)
diagram.append("```")
return "\n".join(diagram)
def generate_circular_diagram(points):
"""Generate a circular flow Mermaid diagram"""
diagram = ["```mermaid", "graph TD"]
for point in points:
node_id = point['number']
node_label = f"{node_id}. {point['emoji']} {point['keyword'].capitalize()}"
diagram.append(f" {node_id}[\"{node_label}\"]")
diagram.extend([
" 1 --> 2 --> 3 --> 4 --> 5 --> 1",
" %% Style definitions",
" classDef q1 fill:#ff9900,stroke:#333,stroke-width:2px,color:#000;",
" class 1,2,3,4,5 q1;"
])
diagram.append("```")
return "\n".join(diagram)
def generate_categorical_diagram(points):
"""Generate a categorical Mermaid diagram grouping the storytelling elements"""
diagram = ["```mermaid", "graph TB",
" subgraph Foundation[\"Foundation Elements\"]",
" 1(\"`1. ๐ Location`\")",
" 2(\"`2. ๐ Actions`\")",
" 3(\"`3. ๐ง Thoughts`\")",
" 4(\"`4. ๐ฒ Emotions`\")",
" 5(\"`5. ๐ฌ Dialogue`\")",
" end",
"```"]
return "\n".join(diagram)
if __name__ == "__main__":
main()
|