Spaces:
Sleeping
Sleeping
File size: 14,082 Bytes
78b86a9 a7c26a1 78b86a9 a7c26a1 78b86a9 a7c26a1 78b86a9 a7c26a1 78b86a9 a7c26a1 |
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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
import streamlit as st
import json
def create_pdf(structure):
pdf = FPDF()
pdf.add_page()
# Title
pdf.set_font('Arial', 'B', 16)
pdf.cell(0, 10, 'Informative Speech Structure', ln=True, align='C')
pdf.ln(10)
# Introduction
pdf.set_font('Arial', 'B', 14)
pdf.cell(0, 10, 'Introduction', ln=True)
pdf.set_font('Arial', '', 12)
intro_points = [
'- Attention Getter',
'- Topic Introduction',
'- Credibility Statement',
'- Preview of Main Points'
]
for point in intro_points:
pdf.cell(0, 10, point, ln=True)
pdf.ln(5)
# Main Points
pdf.set_font('Arial', 'B', 14)
pdf.cell(0, 10, 'Body', ln=True)
for i, point in enumerate(structure['main_points'], 1):
pdf.set_font('Arial', 'B', 12)
pdf.cell(0, 10, f'Main Point {i}: {point["category"]}', ln=True)
pdf.set_font('Arial', '', 12)
for item in point['items']:
pdf.cell(0, 10, f'- {item}', ln=True)
pdf.ln(5)
# Conclusion
pdf.set_font('Arial', 'B', 14)
pdf.cell(0, 10, 'Conclusion', ln=True)
pdf.set_font('Arial', '', 12)
conclusion_points = [
'- Signal the End',
'- Review Main Points',
'- Memorable Closing'
]
for point in conclusion_points:
pdf.cell(0, 10, point, ln=True)
return pdf
def show():
# Add custom CSS for the download button and new sections
st.markdown("""
<style>
div[data-testid="stDownloadButton"] button {
background-color: #0066cc;
color: white;
font-weight: bold;
padding: 12px 24px;
border: none;
border-radius: 6px;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
transition: all 0.3s ease;
}
div[data-testid="stDownloadButton"] button:hover {
background-color: #0052a3;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
div[data-testid="stDownloadButton"] button p {
color: white !important;
}
.main-point-box {
background-color: #f0f2f6;
border-radius: 10px;
padding: 20px;
margin: 10px 0;
border-left: 5px solid #0066cc;
}
.reference-box {
background-color: #fff3cd;
border-radius: 10px;
padding: 20px;
margin: 10px 0;
border-left: 5px solid #ffc107;
}
.example-box {
background-color: #e8f4f8;
border-radius: 10px;
padding: 20px;
margin: 10px 0;
border-left: 5px solid #2E86C1;
}
</style>
""", unsafe_allow_html=True)
st.title("Module 1: Informative Speech Structure")
# Introduction
st.markdown("""
Welcome to the National Speech & Debate Association's approach to informative speaking.
This module will guide you through creating an effective informative speech that educates,
engages, and enlightens your audience.
""")
# Learning Objectives
st.subheader("Learning Objectives")
st.markdown("""
- Master the NSDA's three-point structure for informative speaking
- Learn how to effectively use references to support your points
- Create a well-organized speech that builds audience understanding
- Develop engaging content that educates your audience
""")
# The Three-Point Structure
st.subheader("The Three-Point Structure")
st.markdown("""
The foundation of an effective informative speech lies in its structure.
Every great informative speech follows a clear three-point structure that helps
your audience understand and remember your message.
""")
col1, col2, col3 = st.columns(3)
with col1:
st.markdown("""
<div class="main-point-box">
<h3>π Point 1: Foundation</h3>
<p>Start with the basics:</p>
<ul>
<li>What is it?</li>
<li>How does it work?</li>
<li>Key features</li>
</ul>
<p><em>This builds your audience's understanding</em></p>
</div>
""", unsafe_allow_html=True)
with col2:
st.markdown("""
<div class="main-point-box">
<h3>π‘ Point 2: Development</h3>
<p>Build on the foundation:</p>
<ul>
<li>How is it unique?</li>
<li>What makes it special?</li>
<li>Key differences</li>
</ul>
<p><em>This adds depth to their knowledge</em></p>
</div>
""", unsafe_allow_html=True)
with col3:
st.markdown("""
<div class="main-point-box">
<h3>π Point 3: Implications</h3>
<p>Connect to bigger picture:</p>
<ul>
<li>Why does it matter?</li>
<li>Impact on society</li>
<li>Future significance</li>
</ul>
<p><em>This shows why it's important</em></p>
</div>
""", unsafe_allow_html=True)
# Reference Section
st.markdown("""
<div class="reference-box">
<h3>π The Power of References</h3>
<p>References are crucial in informative speaking because they:</p>
<ul>
<li>Build credibility with your audience</li>
<li>Support your main points with evidence</li>
<li>Show thorough research and preparation</li>
<li>Help you avoid plagiarism</li>
<li>Allow listeners to verify your information</li>
</ul>
<p><strong>Remember:</strong> Every key fact, statistic, or quote in your speech should be traceable to a reliable source.</p>
</div>
""", unsafe_allow_html=True)
# Example Section
st.markdown("### π± Real-World Example")
# Create three columns for the structure
col1, col2, col3 = st.columns(3)
with col1:
st.info("""
**Foundation**
What is Fairphone?
- Company history
- Basic features
- Availability
""")
with col2:
st.info("""
**Development**
What makes it unique?
- Modular design
- Ethical manufacturing
- Supply chain
""")
with col3:
st.info("""
**Implications**
Why does it matter?
- E-waste impact
- Industry standards
- Future technology
""")
# Add a visual separator
st.markdown("---")
# Add a note about references
st.markdown("""
> π‘ **Pro Tip**: Each point should be supported by at least one credible source.
For example, when discussing e-waste impact, cite specific statistics or research studies.
""")
# Interactive Outline Builder
st.subheader("Create Your Speech Structure")
st.markdown("""
Now it's your turn! Use the interactive builder below to create your own speech structure.
Remember to:
- Start with a strong foundation
- Build on your first point
- Connect to bigger implications
- Include references for each key point
""")
# Outline Creation Process
st.subheader("Outline Creation Process")
# Create Your Outline Structure
st.markdown("### Create Your Outline Structure")
st.markdown("""
Create your final structure with:
- Introduction
- Three main points
- Conclusion
""")
# Interactive Speech Outlining Activity
st.markdown("### π― Create Your Speech Outline")
# Add custom CSS for the blocks
st.markdown("""
<style>
.main-point-block {
background-color: #f0f2f6;
border-radius: 10px;
padding: 20px;
margin: 10px 0;
border-left: 5px solid #0066cc;
}
.supporting-points {
background-color: #ffffff;
border-radius: 8px;
padding: 15px;
margin: 10px 0;
border: 1px solid #e0e0e0;
}
</style>
""", unsafe_allow_html=True)
# Initialize session state
if 'speech_outline' not in st.session_state:
st.session_state.speech_outline = {
'foundation': {'main': '', 'points': []},
'development': {'main': '', 'points': []},
'implications': {'main': '', 'points': []}
}
# Create three columns for the main points
col1, col2, col3 = st.columns(3)
with col1:
st.markdown("##### π Foundation")
st.markdown("What is the basic information your audience needs to know?")
foundation_main = st.text_input(
"Main Point:",
value=st.session_state.speech_outline['foundation']['main'],
help="The main idea about the basics of your topic"
)
if foundation_main:
st.session_state.speech_outline['foundation']['main'] = foundation_main
foundation_points = st.text_area(
"Supporting Points (one per line):",
value='\n'.join(st.session_state.speech_outline['foundation']['points']),
help="List the key points that support your foundation"
)
if foundation_points:
st.session_state.speech_outline['foundation']['points'] = [p.strip() for p in foundation_points.split('\n') if p.strip()]
with col2:
st.markdown("##### π‘ Development")
st.markdown("What makes your topic unique or special?")
development_main = st.text_input(
"Main Point:",
value=st.session_state.speech_outline['development']['main'],
help="The main idea about what makes your topic unique"
)
if development_main:
st.session_state.speech_outline['development']['main'] = development_main
development_points = st.text_area(
"Supporting Points (one per line):",
value='\n'.join(st.session_state.speech_outline['development']['points']),
help="List the key points that support your development"
)
if development_points:
st.session_state.speech_outline['development']['points'] = [p.strip() for p in development_points.split('\n') if p.strip()]
with col3:
st.markdown("##### π Implications")
st.markdown("Why does your topic matter to society?")
implications_main = st.text_input(
"Main Point:",
value=st.session_state.speech_outline['implications']['main'],
help="The main idea about why your topic matters"
)
if implications_main:
st.session_state.speech_outline['implications']['main'] = implications_main
implications_points = st.text_area(
"Supporting Points (one per line):",
value='\n'.join(st.session_state.speech_outline['implications']['points']),
help="List the key points that support your implications"
)
if implications_points:
st.session_state.speech_outline['implications']['points'] = [p.strip() for p in implications_points.split('\n') if p.strip()]
# Generate Outline
if st.button("π Generate Speech Outline"):
st.markdown("### Your Speech Outline")
# Create a single markdown box for the entire outline
outline_content = f"""
**Introduction**
\n - Attention Getter
\n - Topic Introduction
\n - Credibility Statement
\n - Preview of Main Points
**Foundation**
Main Point: {st.session_state.speech_outline['foundation']['main']}
Supporting Points:
{chr(10).join([f"β’ {point}" for point in st.session_state.speech_outline['foundation']['points']])}
**Development**
Main Point: {st.session_state.speech_outline['development']['main']}
Supporting Points:
{chr(10).join([f"β’ {point}" for point in st.session_state.speech_outline['development']['points']])}
**Implications**
Main Point: {st.session_state.speech_outline['implications']['main']}
Supporting Points:
{chr(10).join([f"β’ {point}" for point in st.session_state.speech_outline['implications']['points']])}
\n**Conclusion**
\n - Signal the End
\n - Review Main Points
\n - Memorable Closing
"""
# Display the outline in a clean format
st.markdown(outline_content)
# Download Button
outline_json = json.dumps(st.session_state.speech_outline, indent=2)
st.download_button(
label="π₯ Download Your Outline",
data=outline_json,
file_name="speech_outline.json",
mime="application/json"
)
# NSDA Tips
st.subheader("NSDA Tips for Success")
with st.expander("π Key Tips"):
st.markdown("""
- Don't expect a perfect outline on your first try
- Your outline will evolve as you research and practice
- Look for gaps in your information
- Consider if visual aids would help explain complex concepts
- Keep track of your time - staying within limits is crucial
- Save all feedback and use it to improve
""")
# Next Steps
st.info("""
### Next Steps
After creating your structure:
1. Begin researching your main points in detail
2. Consider if visual aids would enhance your speech
3. Practice your timing
4. Move on to Module 2: Developing Your Speech Content
""") |