Spaces:
Sleeping
Sleeping
File size: 23,657 Bytes
9540a98 32f3c41 fd1c160 c836092 58f7235 9540a98 32f3c41 9540a98 58f7235 9540a98 c836092 fd1c160 9540a98 32f3c41 c836092 32f3c41 58f7235 32f3c41 f414da4 32f3c41 58f7235 32f3c41 58f7235 820a120 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 32f3c41 fd1c160 32f3c41 58f7235 32f3c41 9dc9f53 32f3c41 58f7235 c836092 58f7235 cf80e69 58f7235 cf80e69 58f7235 32f3c41 58f7235 32f3c41 58f7235 f414da4 58f7235 32f3c41 58f7235 32f3c41 58f7235 c836092 58f7235 f414da4 58f7235 cf80e69 32f3c41 58f7235 cf80e69 32f3c41 58f7235 32f3c41 58f7235 c836092 cf80e69 58f7235 32f3c41 58f7235 f414da4 58f7235 f414da4 58f7235 cf80e69 58f7235 f414da4 58f7235 32f3c41 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 f414da4 58f7235 32f3c41 58f7235 cf80e69 58f7235 cf80e69 58f7235 32f3c41 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 cf80e69 58f7235 32f3c41 f414da4 32f3c41 58f7235 32f3c41 4340739 |
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 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 |
import streamlit as st
import json
import time
import random
from datetime import datetime
# Set page config
st.set_page_config(
page_title="Training Course Outline Generator",
page_icon="π",
layout="wide",
initial_sidebar_state="collapsed"
)
# Custom CSS
st.markdown("""
<style>
.main .block-container {
padding-top: 2rem;
padding-bottom: 2rem;
max-width: 1000px;
margin: 0 auto;
}
.stApp {
background-color: #f8f9fa;
}
.title-area {
text-align: center;
margin-bottom: 2rem;
}
.custom-subheader {
background-color: #f0f2f6;
padding: 10px;
border-radius: 5px;
margin-bottom: 10px;
font-weight: 600;
}
.generated-outline {
border: 1px solid #ddd;
border-radius: 5px;
padding: 20px;
background-color: white;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.stButton button {
width: 100%;
}
.footnote {
font-size: 0.8rem;
color: #6c757d;
margin-top: 2rem;
}
.settings-section {
background-color: #f8f9fa;
padding: 15px;
border-radius: 5px;
margin-bottom: 20px;
}
.examples-section {
background-color: #e9f7fe;
padding: 15px;
border-radius: 5px;
margin-bottom: 20px;
}
.placeholder-area {
border: 2px dashed #ddd;
border-radius: 10px;
padding: 40px;
text-align: center;
background-color: #f8f9fa;
color: #666;
}
.metric-card {
background-color: #f8f9fa;
padding: 15px;
border-radius: 8px;
border-left: 4px solid #007bff;
margin-bottom: 15px;
}
.outline-section {
background-color: #ffffff;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
border: 1px solid #e9ecef;
}
.success-indicator {
background-color: #d4edda;
color: #155724;
padding: 10px;
border-radius: 5px;
border: 1px solid #c3e6cb;
margin-bottom: 15px;
}
.recommendation {
background-color: #fff3cd;
color: #856404;
padding: 15px;
border-radius: 5px;
border: 1px solid #ffeaa7;
margin-top: 15px;
}
.partnership-cta {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 20px;
border-radius: 10px;
text-align: center;
margin-top: 20px;
}
</style>
""", unsafe_allow_html=True)
# Title and description
st.markdown("""
<div class="title-area">
<h1>Training Course Outline Generator π</h1>
<p>Transform your training ideas into structured, actionable course outlines. Perfect for L&D leaders planning their next training initiative!</p>
</div>
""", unsafe_allow_html=True)
# Initialize session state
if "generated_outline" not in st.session_state:
st.session_state["generated_outline"] = None
if "course_history" not in st.session_state:
st.session_state["course_history"] = []
# Helper functions
def calculate_estimated_duration(delivery_method, content_depth, audience_size):
"""Calculate estimated course duration based on inputs"""
base_hours = {
"In-person workshop": 8,
"Virtual live session": 4,
"Self-paced online": 6,
"Blended learning": 12,
"Microlearning series": 2,
"On-the-job training": 16
}
depth_multiplier = {
"Basic overview": 0.7,
"Intermediate depth": 1.0,
"Advanced/comprehensive": 1.5,
"Expert level": 2.0
}
size_factor = 1.0
if audience_size == "Large group (20+)":
size_factor = 1.2
elif audience_size == "Small team (5-15)":
size_factor = 0.9
estimated = base_hours.get(delivery_method, 6) * depth_multiplier.get(content_depth, 1.0) * size_factor
return max(1, round(estimated))
def generate_learning_objectives(course_topic, target_audience, goals):
"""Generate sample learning objectives based on inputs"""
objectives = []
# Create objectives based on common learning patterns
action_verbs = ["identify", "analyze", "implement", "evaluate", "create", "demonstrate", "apply", "compare"]
if goals:
goal_keywords = goals.lower().split()
if any(word in goal_keywords for word in ["skill", "skills", "ability", "practice"]):
objectives.append(f"Demonstrate practical {course_topic.lower()} skills relevant to {target_audience.lower()}")
if any(word in goal_keywords for word in ["knowledge", "understand", "learn", "know"]):
objectives.append(f"Analyze key concepts and principles of {course_topic.lower()}")
if any(word in goal_keywords for word in ["improve", "enhance", "better", "increase"]):
objectives.append(f"Implement strategies to improve {course_topic.lower()} outcomes")
if any(word in goal_keywords for word in ["solve", "problem", "challenge", "issue"]):
objectives.append(f"Evaluate and solve common {course_topic.lower()} challenges")
# Add default objectives if none generated
if not objectives:
objectives = [
f"Apply {course_topic.lower()} best practices in real-world scenarios",
f"Identify key success factors for {course_topic.lower()}",
f"Create actionable plans for implementing {course_topic.lower()} strategies"
]
return objectives[:4] # Limit to 4 objectives
def generate_course_modules(course_topic, objectives, delivery_method):
"""Generate suggested course modules"""
modules = []
# Always start with introduction
modules.append({
"title": f"Introduction to {course_topic}",
"duration": "30-45 minutes",
"content": ["Course overview", "Learning objectives", "Participant introductions", "Setting expectations"]
})
# Generate core modules based on objectives
for i, objective in enumerate(objectives, 1):
module_title = f"Module {i}: {objective.split(' ', 1)[1].title()}"
modules.append({
"title": module_title,
"duration": "60-90 minutes",
"content": ["Theory and concepts", "Practical exercises", "Case studies", "Group discussions"]
})
# Add application/wrap-up module
if delivery_method in ["In-person workshop", "Virtual live session", "Blended learning"]:
modules.append({
"title": "Application & Action Planning",
"duration": "45-60 minutes",
"content": ["Real-world application", "Action planning", "Next steps", "Resources and support"]
})
return modules
def calculate_readiness_score(inputs):
"""Calculate a readiness score based on how complete the inputs are"""
score = 0
max_score = 100
# Core requirements (60 points)
if inputs.get('course_topic'): score += 15
if inputs.get('target_audience'): score += 15
if inputs.get('learning_goals'): score += 15
if inputs.get('delivery_method'): score += 15
# Additional details (40 points)
if inputs.get('available_content'): score += 10
if inputs.get('subject_matter_experts'): score += 10
if inputs.get('success_metrics'): score += 10
if inputs.get('timeline'): score += 5
if inputs.get('budget_range'): score += 5
return min(score, max_score)
def generate_recommendations(inputs, readiness_score):
"""Generate personalized recommendations"""
recommendations = []
if readiness_score < 60:
recommendations.append("π― **Priority**: Define clearer learning objectives and success metrics to strengthen your course foundation.")
if not inputs.get('subject_matter_experts'):
recommendations.append("π₯ **Expert Input**: Consider engaging subject matter experts early to ensure content accuracy and relevance.")
if inputs.get('delivery_method') == 'Self-paced online' and not inputs.get('available_content'):
recommendations.append("π **Content Strategy**: Self-paced courses require substantial pre-existing content. Plan for content creation resources.")
if inputs.get('target_audience') and 'manager' in inputs.get('target_audience', '').lower():
recommendations.append("β‘ **Manager Focus**: Consider shorter, action-oriented modules that respect managers' time constraints.")
if inputs.get('delivery_method') == 'Microlearning series':
recommendations.append("π± **Microlearning Tips**: Break content into 5-10 minute digestible chunks with clear takeaways.")
if readiness_score >= 80:
recommendations.append("π **Ready to Launch**: Your course outline is well-developed! Consider piloting with a small group first.")
return recommendations
# Main content
col1, col2 = st.columns([1, 1])
with col1:
st.markdown('<div class="custom-subheader">Course Planning Inputs</div>', unsafe_allow_html=True)
# Core course information
st.markdown("**π Core Course Information**")
course_topic = st.text_input(
"Course Topic/Subject",
placeholder="e.g., Leadership Development, Data Analysis, Customer Service",
help="What is the main subject or skill your course will cover?"
)
target_audience = st.text_input(
"Target Audience",
placeholder="e.g., New managers, Sales team, Customer support representatives",
help="Who are the learners? Be specific about their role, experience level, etc."
)
learning_goals = st.text_area(
"Learning Goals & Objectives",
placeholder="e.g., Improve team communication skills, reduce customer complaints by 20%, increase productivity",
height=100,
help="What should participants be able to do after completing the course?"
)
col_d1, col_d2 = st.columns(2)
with col_d1:
delivery_method = st.selectbox(
"Preferred Delivery Method",
["In-person workshop", "Virtual live session", "Self-paced online", "Blended learning", "Microlearning series", "On-the-job training"],
help="How do you want to deliver this training?"
)
with col_d2:
content_depth = st.selectbox(
"Content Depth",
["Basic overview", "Intermediate depth", "Advanced/comprehensive", "Expert level"],
index=1,
help="How deep should the content go?"
)
# Additional details in expandable section
with st.expander("π Additional Planning Details", expanded=False):
st.markdown('<div class="settings-section">', unsafe_allow_html=True)
col_a1, col_a2 = st.columns(2)
with col_a1:
audience_size = st.selectbox(
"Audience Size",
["Individual (1-on-1)", "Small team (5-15)", "Medium group (15-30)", "Large group (20+)"],
index=1
)
timeline = st.selectbox(
"Development Timeline",
["Rush (1-2 weeks)", "Standard (1-2 months)", "Extended (3-6 months)", "Long-term (6+ months)"],
index=1
)
with col_a2:
budget_range = st.selectbox(
"Budget Range",
["Minimal budget", "Small budget ($1K-5K)", "Medium budget ($5K-20K)", "Large budget ($20K+)", "Not specified"],
index=4
)
priority_level = st.selectbox(
"Priority Level",
["Low priority", "Medium priority", "High priority", "Critical/urgent"],
index=2
)
available_content = st.text_area(
"Available Content & Resources",
placeholder="e.g., Existing presentations, documentation, videos, previous training materials",
height=75,
help="What materials do you already have that could be used or adapted?"
)
subject_matter_experts = st.text_input(
"Subject Matter Experts Available",
placeholder="e.g., John Smith (Sales Director), external consultant, internal team leads",
help="Who can provide expertise and content validation?"
)
success_metrics = st.text_area(
"Success Metrics & Evaluation",
placeholder="e.g., Participant satisfaction scores, skill assessments, behavior change metrics, business impact",
height=75,
help="How will you measure if the training was successful?"
)
st.markdown('</div>', unsafe_allow_html=True)
# Example scenarios for inspiration
with st.expander("Need inspiration? View example training scenarios", expanded=False):
st.markdown('<div class="examples-section">', unsafe_allow_html=True)
example_scenarios = [
{
"title": "New Manager Leadership Program",
"topic": "Leadership Fundamentals",
"audience": "Newly promoted managers",
"goals": "Develop core leadership skills, improve team management, increase employee engagement scores by 15%"
},
{
"title": "Customer Service Excellence",
"topic": "Advanced Customer Service Skills",
"audience": "Customer support representatives",
"goals": "Reduce customer complaints by 25%, improve satisfaction ratings, handle difficult situations confidently"
},
{
"title": "Data-Driven Decision Making",
"topic": "Business Analytics and Data Interpretation",
"audience": "Department managers and analysts",
"goals": "Make better decisions using data, create meaningful reports, identify key performance indicators"
},
{
"title": "Remote Team Management",
"topic": "Managing Virtual Teams",
"audience": "Team leaders and managers",
"goals": "Improve virtual team productivity, enhance remote communication, maintain team culture"
}
]
for i, example in enumerate(example_scenarios):
if st.button(f"Use Example: {example['title']}", key=f"example_{i}"):
st.session_state["example_data"] = example
st.rerun()
st.markdown('</div>', unsafe_allow_html=True)
# Apply example data if selected
if "example_data" in st.session_state:
example = st.session_state["example_data"]
course_topic = example["topic"]
target_audience = example["audience"]
learning_goals = example["goals"]
del st.session_state["example_data"]
# Generate outline button
generate_button = st.button(
"π Generate Course Outline",
disabled=not course_topic or not target_audience or not learning_goals,
use_container_width=True
)
if not course_topic or not target_audience or not learning_goals:
st.info("Please fill in the core course information (topic, audience, and goals) to generate an outline")
# Display generated outline
with col2:
st.markdown('<div class="custom-subheader">Generated Course Outline</div>', unsafe_allow_html=True)
if generate_button and course_topic and target_audience and learning_goals:
with st.spinner("Creating your course outline..."):
# Simulate processing time
time.sleep(1)
# Collect all inputs
course_inputs = {
'course_topic': course_topic,
'target_audience': target_audience,
'learning_goals': learning_goals,
'delivery_method': delivery_method,
'content_depth': content_depth,
'audience_size': audience_size if 'audience_size' in locals() else 'Medium group (15-30)',
'timeline': timeline if 'timeline' in locals() else 'Standard (1-2 months)',
'budget_range': budget_range if 'budget_range' in locals() else 'Not specified',
'priority_level': priority_level if 'priority_level' in locals() else 'Medium priority',
'available_content': available_content if 'available_content' in locals() else '',
'subject_matter_experts': subject_matter_experts if 'subject_matter_experts' in locals() else '',
'success_metrics': success_metrics if 'success_metrics' in locals() else ''
}
# Generate course outline components
estimated_duration = calculate_estimated_duration(delivery_method, content_depth, course_inputs['audience_size'])
learning_objectives = generate_learning_objectives(course_topic, target_audience, learning_goals)
course_modules = generate_course_modules(course_topic, learning_objectives, delivery_method)
readiness_score = calculate_readiness_score(course_inputs)
recommendations = generate_recommendations(course_inputs, readiness_score)
outline_data = {
'inputs': course_inputs,
'estimated_duration': estimated_duration,
'learning_objectives': learning_objectives,
'course_modules': course_modules,
'readiness_score': readiness_score,
'recommendations': recommendations,
'generated_date': datetime.now().strftime("%Y-%m-%d %H:%M")
}
st.session_state["generated_outline"] = outline_data
# Add to history
if outline_data not in st.session_state["course_history"]:
st.session_state["course_history"].insert(0, outline_data)
st.session_state["course_history"] = st.session_state["course_history"][:5] # Keep last 5
st.success("β
Course outline generated successfully!")
if st.session_state["generated_outline"] is not None:
outline = st.session_state["generated_outline"]
st.markdown('<div class="generated-outline">', unsafe_allow_html=True)
# Course Overview Section
st.markdown("### π Course Overview")
st.markdown(f"**Course Title:** {outline['inputs']['course_topic']}")
st.markdown(f"**Target Audience:** {outline['inputs']['target_audience']}")
st.markdown(f"**Delivery Method:** {outline['inputs']['delivery_method']}")
st.markdown(f"**Estimated Duration:** {outline['estimated_duration']} hours")
# Readiness Score
score_color = "green" if outline['readiness_score'] >= 80 else "orange" if outline['readiness_score'] >= 60 else "red"
st.markdown(f"""
<div class="success-indicator">
<strong>Course Readiness Score: <span style="color: {score_color};">{outline['readiness_score']}/100</span></strong>
<br><small>Based on completeness of planning inputs</small>
</div>
""", unsafe_allow_html=True)
# Learning Objectives
st.markdown("### π― Learning Objectives")
st.markdown("Upon completion, participants will be able to:")
for i, objective in enumerate(outline['learning_objectives'], 1):
st.markdown(f"{i}. {objective.capitalize()}")
# Course Modules
st.markdown("### π Proposed Course Structure")
for i, module in enumerate(outline['course_modules'], 1):
st.markdown(f"""
<div class="outline-section">
<strong>{module['title']}</strong> ({module['duration']})
<ul>
{"".join([f"<li>{item}</li>" for item in module['content']])}
</ul>
</div>
""", unsafe_allow_html=True)
# Success Metrics
if outline['inputs']['success_metrics']:
st.markdown("### π Success Metrics")
st.markdown(outline['inputs']['success_metrics'])
# Recommendations
if outline['recommendations']:
st.markdown("### π‘ Recommendations & Next Steps")
for rec in outline['recommendations']:
st.markdown(f"""
<div class="recommendation">
{rec}
</div>
""", unsafe_allow_html=True)
st.markdown('</div>', unsafe_allow_html=True)
# Action buttons
col_b1, col_b2 = st.columns(2)
with col_b1:
# Download as JSON
outline_json = json.dumps(outline, indent=2)
st.download_button(
label="πΎ Download Outline",
data=outline_json,
file_name=f"course_outline_{int(time.time())}.json",
mime="application/json",
use_container_width=True
)
with col_b2:
# Regenerate button
if st.button("π Refine Outline", use_container_width=True):
with st.spinner("Refining course outline..."):
time.sleep(1)
# Regenerate with slight variations
learning_objectives = generate_learning_objectives(course_topic, target_audience, learning_goals)
course_modules = generate_course_modules(course_topic, learning_objectives, delivery_method)
outline['learning_objectives'] = learning_objectives
outline['course_modules'] = course_modules
st.session_state["generated_outline"] = outline
st.success("β
Outline refined!")
st.rerun()
# Partnership CTA
st.markdown("""
<div class="partnership-cta">
<h3>π Ready to Bring Your Course to Life?</h3>
<p>This outline is just the beginning! Partner with our team to transform your vision into a comprehensive, engaging training program that delivers real results.</p>
<p><strong>Next Steps:</strong> Content development β’ Instructional design β’ Learning technology β’ Delivery support</p>
</div>
""", unsafe_allow_html=True)
else:
# Placeholder
st.markdown("""
<div class="placeholder-area">
<h3>π Your Course Outline Will Appear Here</h3>
<p>Fill in the course planning details and click 'Generate Course Outline' to see your structured training plan.</p>
<br>
<p><strong>Your outline will include:</strong></p>
<p>β
Learning objectives<br>
β
Course structure & modules<br>
β
Estimated duration<br>
β
Readiness assessment<br>
β
Personalized recommendations</p>
</div>
""", unsafe_allow_html=True)
# Footer
st.markdown("""
<div class="footnote">
<p><strong>About this tool:</strong> The Training Course Outline Generator helps L&D professionals structure their training ideas into actionable plans. Generated outlines provide a foundation for course development and can be customized based on your specific organizational needs.</p>
</div>
""", unsafe_allow_html=True) |