bparrino commited on
Commit
2283d76
·
verified ·
1 Parent(s): b012666

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +71 -50
app.py CHANGED
@@ -115,6 +115,33 @@ st.markdown("""
115
  .section-spacer {
116
  margin: 30px 0;
117
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  </style>
119
  """, unsafe_allow_html=True)
120
 
@@ -458,25 +485,12 @@ with col1:
458
 
459
  st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
460
 
461
- # Consultation CTA - Updated with link
462
- st.markdown("""
463
- <div class="consultation-cta">
464
- <h4>Want Expert Guidance?</h4>
465
- <p style="margin-bottom: 15px;">Get personalized recommendations from our learning design experts</p>
466
- </div>
467
- """, unsafe_allow_html=True)
468
-
469
- if st.button("Schedule Free Consultation", use_container_width=True, type="primary"):
470
- st.markdown('<script>window.open("https://www.motechhq.com/connect/", "_blank");</script>', unsafe_allow_html=True)
471
- st.success("Opening consultation page in a new tab...")
472
-
473
- st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
474
-
475
  # Generate recommendations button
476
  generate_button = st.button(
477
  "Get My Recommendations",
478
  disabled=not objectives or not goals,
479
- use_container_width=True
 
480
  )
481
 
482
  if not objectives:
@@ -530,18 +544,18 @@ with col2:
530
  for i, (format_id, score) in enumerate(recommendations["formats"][:3]):
531
  format_data = TRAINING_FORMATS[format_id]
532
 
533
- st.markdown(f'<div class="format-card">', unsafe_allow_html=True)
534
  st.markdown(f'<div class="format-title">{format_data["name"]} <span class="match-score">{score}% Match</span></div>', unsafe_allow_html=True)
535
  st.markdown(f'<div class="format-description">{format_data["description"]}</div>', unsafe_allow_html=True)
536
 
537
  # Add sample link if available
538
  if "sample_link" in format_data:
539
- st.markdown(f'<a href="{format_data["sample_link"]}" target="_blank" style="color: #1f77b4; text-decoration: none;">View Sample</a>', unsafe_allow_html=True)
540
  st.markdown("<br>", unsafe_allow_html=True)
541
 
542
  # Show ROI metrics
543
  if "roi_metrics" in format_data:
544
- st.markdown(f'<div style="background-color: #e8f5e8; padding: 8px; border-radius: 4px; margin: 8px 0; font-size: 0.9rem;"><strong>Expected Results:</strong> {format_data["roi_metrics"]}</div>', unsafe_allow_html=True)
545
 
546
  # Show key details
547
  st.markdown(f"""
@@ -553,14 +567,6 @@ with col2:
553
  </div>
554
  """, unsafe_allow_html=True)
555
 
556
- # Add "Get Custom Proposal" button for top recommendation
557
- if i == 0:
558
- st.markdown('<div style="margin-top: 15px;">', unsafe_allow_html=True)
559
- if st.button(f"Get Custom Proposal", key=f"proposal_{format_id}", use_container_width=True, type="primary"):
560
- st.balloons()
561
- st.success("Excellent choice! Our learning design experts will be in touch within 24 hours.")
562
- st.markdown('</div>', unsafe_allow_html=True)
563
-
564
  st.markdown('</div>', unsafe_allow_html=True)
565
 
566
  # Expandable "View More Options" section
@@ -570,12 +576,12 @@ with col2:
570
  for i, (format_id, score) in enumerate(recommendations["formats"][3:5], 4):
571
  format_data = TRAINING_FORMATS[format_id]
572
 
573
- st.markdown(f'<div style="border: 1px solid #e0e0e0; border-radius: 5px; padding: 10px; margin-bottom: 10px; background-color: #f9f9f9;">', unsafe_allow_html=True)
574
- st.markdown(f'<strong>{format_data["name"]}</strong> <span style="color: #666;">({score}% Match)</span>')
575
  st.markdown(f'{format_data["description"]}')
576
 
577
  if "sample_link" in format_data:
578
- st.markdown(f'<a href="{format_data["sample_link"]}" target="_blank" style="color: #1f77b4; text-decoration: none; font-size: 0.9rem;">View Sample</a>', unsafe_allow_html=True)
579
 
580
  if "roi_metrics" in format_data:
581
  st.markdown(f'<div style="font-size: 0.85rem; color: #666; margin-top: 5px;"><strong>Expected Results:</strong> {format_data["roi_metrics"]}</div>', unsafe_allow_html=True)
@@ -586,31 +592,33 @@ with col2:
586
 
587
  st.markdown('</div>', unsafe_allow_html=True)
588
 
589
- # Action buttons
 
 
 
590
  col_b1, col_b2 = st.columns(2)
591
 
592
  with col_b1:
593
- # Generate report
594
- report_data = {
595
- "timestamp": time.strftime("%Y-%m-%d %H:%M:%S"),
596
- "recommendations": recommendations
597
- }
598
-
599
- report_json = json.dumps(report_data, indent=2)
600
-
601
- st.download_button(
602
- label="Download Report",
603
- data=report_json,
604
- file_name=f"training_recommendations_{int(time.time())}.json",
605
- mime="application/json",
606
- use_container_width=True
607
- )
608
 
609
  with col_b2:
610
- # New analysis button
611
- if st.button("New Analysis", use_container_width=True):
612
- st.session_state["recommendations"] = None
613
- st.rerun()
 
 
 
 
 
 
 
 
 
614
 
615
  else:
616
  # Placeholder content when no recommendations yet
@@ -618,8 +626,21 @@ with col2:
618
  st.markdown('<h3>Your Recommendations Will Appear Here</h3>')
619
  st.markdown('<p>Complete the form and click "Get My Recommendations" to see your personalized training format suggestions.</p>')
620
  st.markdown('</div>', unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
621
 
622
  # Footer
623
  st.markdown('<div class="footnote">', unsafe_allow_html=True)
624
  st.markdown('*This tool uses advanced algorithms to match your requirements with optimal training formats based on industry best practices.*')
625
- st.markdown('</div>', unsafe_allow_html=True)
 
115
  .section-spacer {
116
  margin: 30px 0;
117
  }
118
+ .action-buttons-container {
119
+ margin-top: 20px;
120
+ padding-top: 15px;
121
+ border-top: 1px solid #e0e0e0;
122
+ }
123
+ .roi-metrics {
124
+ background-color: #e8f5e8;
125
+ padding: 8px;
126
+ border-radius: 4px;
127
+ margin: 8px 0;
128
+ font-size: 0.9rem;
129
+ }
130
+ .additional-option {
131
+ border: 1px solid #e0e0e0;
132
+ border-radius: 5px;
133
+ padding: 10px;
134
+ margin-bottom: 10px;
135
+ background-color: #f9f9f9;
136
+ }
137
+ .sample-link {
138
+ color: #1f77b4;
139
+ text-decoration: none;
140
+ font-size: 0.9rem;
141
+ }
142
+ .sample-link:hover {
143
+ text-decoration: underline;
144
+ }
145
  </style>
146
  """, unsafe_allow_html=True)
147
 
 
485
 
486
  st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
487
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
488
  # Generate recommendations button
489
  generate_button = st.button(
490
  "Get My Recommendations",
491
  disabled=not objectives or not goals,
492
+ use_container_width=True,
493
+ type="primary"
494
  )
495
 
496
  if not objectives:
 
544
  for i, (format_id, score) in enumerate(recommendations["formats"][:3]):
545
  format_data = TRAINING_FORMATS[format_id]
546
 
547
+ st.markdown('<div class="format-card">', unsafe_allow_html=True)
548
  st.markdown(f'<div class="format-title">{format_data["name"]} <span class="match-score">{score}% Match</span></div>', unsafe_allow_html=True)
549
  st.markdown(f'<div class="format-description">{format_data["description"]}</div>', unsafe_allow_html=True)
550
 
551
  # Add sample link if available
552
  if "sample_link" in format_data:
553
+ st.markdown(f'<a href="{format_data["sample_link"]}" target="_blank" class="sample-link">View Sample</a>', unsafe_allow_html=True)
554
  st.markdown("<br>", unsafe_allow_html=True)
555
 
556
  # Show ROI metrics
557
  if "roi_metrics" in format_data:
558
+ st.markdown(f'<div class="roi-metrics"><strong>Expected Results:</strong> {format_data["roi_metrics"]}</div>', unsafe_allow_html=True)
559
 
560
  # Show key details
561
  st.markdown(f"""
 
567
  </div>
568
  """, unsafe_allow_html=True)
569
 
 
 
 
 
 
 
 
 
570
  st.markdown('</div>', unsafe_allow_html=True)
571
 
572
  # Expandable "View More Options" section
 
576
  for i, (format_id, score) in enumerate(recommendations["formats"][3:5], 4):
577
  format_data = TRAINING_FORMATS[format_id]
578
 
579
+ st.markdown('<div class="additional-option">', unsafe_allow_html=True)
580
+ st.markdown(f'**{format_data["name"]}** ({score}% Match)')
581
  st.markdown(f'{format_data["description"]}')
582
 
583
  if "sample_link" in format_data:
584
+ st.markdown(f'<a href="{format_data["sample_link"]}" target="_blank" class="sample-link">View Sample</a>', unsafe_allow_html=True)
585
 
586
  if "roi_metrics" in format_data:
587
  st.markdown(f'<div style="font-size: 0.85rem; color: #666; margin-top: 5px;"><strong>Expected Results:</strong> {format_data["roi_metrics"]}</div>', unsafe_allow_html=True)
 
592
 
593
  st.markdown('</div>', unsafe_allow_html=True)
594
 
595
+ # Grouped Action Buttons
596
+ st.markdown('<div class="action-buttons-container">', unsafe_allow_html=True)
597
+ st.markdown("**Take Action:**", unsafe_allow_html=True)
598
+
599
  col_b1, col_b2 = st.columns(2)
600
 
601
  with col_b1:
602
+ # Get proposal button for top recommendation
603
+ top_format = TRAINING_FORMATS[recommendations["formats"][0][0]]
604
+ if st.button(f"Get Custom Proposal for {top_format['name']}", use_container_width=True, type="primary"):
605
+ st.balloons()
606
+ st.success("Excellent choice! Our learning design experts will be in touch within 24 hours.")
 
 
 
 
 
 
 
 
 
 
607
 
608
  with col_b2:
609
+ # Schedule consultation button
610
+ if st.button("Schedule Free Consultation", use_container_width=True):
611
+ st.info("Opening consultation page...")
612
+ st.markdown('<script>window.open("https://www.motechhq.com/connect/", "_blank");</script>', unsafe_allow_html=True)
613
+
614
+ # New analysis button (full width, secondary action)
615
+ st.markdown('<div style="margin-top: 10px;">', unsafe_allow_html=True)
616
+ if st.button("Start New Analysis", use_container_width=True):
617
+ st.session_state["recommendations"] = None
618
+ st.rerun()
619
+ st.markdown('</div>', unsafe_allow_html=True)
620
+
621
+ st.markdown('</div>', unsafe_allow_html=True)
622
 
623
  else:
624
  # Placeholder content when no recommendations yet
 
626
  st.markdown('<h3>Your Recommendations Will Appear Here</h3>')
627
  st.markdown('<p>Complete the form and click "Get My Recommendations" to see your personalized training format suggestions.</p>')
628
  st.markdown('</div>', unsafe_allow_html=True)
629
+
630
+ # Consultation CTA in placeholder area
631
+ st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
632
+ st.markdown("""
633
+ <div class="consultation-cta">
634
+ <h4>Want Expert Guidance?</h4>
635
+ <p style="margin-bottom: 15px;">Get personalized recommendations from our learning design experts</p>
636
+ </div>
637
+ """, unsafe_allow_html=True)
638
+
639
+ if st.button("Schedule Free Consultation", use_container_width=True, key="consultation_placeholder"):
640
+ st.info("Opening consultation page...")
641
+ st.markdown('<script>window.open("https://www.motechhq.com/connect/", "_blank");</script>', unsafe_allow_html=True)
642
 
643
  # Footer
644
  st.markdown('<div class="footnote">', unsafe_allow_html=True)
645
  st.markdown('*This tool uses advanced algorithms to match your requirements with optimal training formats based on industry best practices.*')
646
+ st.markdown('</div>', unsafe_allow_html=True)