bparrino commited on
Commit
bf3ec9b
·
verified ·
1 Parent(s): 30ec6cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -22
app.py CHANGED
@@ -40,6 +40,7 @@ st.markdown("""
40
  padding: 20px;
41
  background-color: white;
42
  margin-bottom: 20px;
 
43
  }
44
  .format-card {
45
  border: 1px solid #e0e0e0;
@@ -507,6 +508,9 @@ with col1:
507
  with col2:
508
  st.markdown('<div class="custom-subheader">Your Personalized Recommendations</div>', unsafe_allow_html=True)
509
 
 
 
 
510
  if generate_button and objectives and goals:
511
  with st.spinner("Analyzing your requirements..."):
512
  # Simulate processing time
@@ -537,11 +541,10 @@ with col2:
537
 
538
  st.success("Analysis complete! Here are your recommendations:")
539
 
 
540
  if st.session_state["recommendations"] is not None:
541
  recommendations = st.session_state["recommendations"]
542
 
543
- st.markdown('<div class="results-container">', unsafe_allow_html=True)
544
-
545
  # Personalized headline
546
  st.markdown(f'<h3 style="color: #2c3e50; margin-bottom: 20px;">Recommended for {recommendations["params"]["audience"].lower()}:</h3>', unsafe_allow_html=True)
547
 
@@ -595,8 +598,6 @@ with col2:
595
  else:
596
  st.markdown("*All relevant options are shown above.*")
597
 
598
- st.markdown('</div>', unsafe_allow_html=True)
599
-
600
  # Grouped Action Buttons
601
  st.markdown('<div class="action-buttons-container">', unsafe_allow_html=True)
602
  st.markdown("**Take Action:**", unsafe_allow_html=True)
@@ -611,13 +612,12 @@ with col2:
611
  st.success("Excellent choice! Our learning design experts will be in touch within 24 hours.")
612
 
613
  with col_b2:
614
- # Clickable consultation CTA
615
- st.markdown("""
616
- <div class="consultation-cta" onclick="window.open('https://www.motechhq.com/connect/', '_blank');">
617
- <h4>Want Expert Guidance?</h4>
618
- <p style="margin-bottom: 0;">Schedule a free consultation with the learning design experts at Motivation Technologies today!</p>
619
- </div>
620
- """, unsafe_allow_html=True)
621
 
622
  # New analysis button (full width, secondary action)
623
  st.markdown('<div style="margin-top: 10px;">', unsafe_allow_html=True)
@@ -629,22 +629,24 @@ with col2:
629
  st.markdown('</div>', unsafe_allow_html=True)
630
 
631
  else:
632
- # Show placeholder inside results container
633
- st.markdown('<div class="results-container">', unsafe_allow_html=True)
634
  st.markdown('<div class="placeholder-area">', unsafe_allow_html=True)
635
  st.markdown('<h3>🎯 Your Recommendations Will Appear Here</h3>')
636
  st.markdown('<p>Complete the form and click "Get My Recommendations" to see your personalized training format suggestions.</p>')
637
  st.markdown('</div>', unsafe_allow_html=True)
638
- st.markdown('</div>', unsafe_allow_html=True)
639
-
640
- # Consultation CTA outside the results container
 
 
 
641
  st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
642
- st.markdown("""
643
- <div class="consultation-cta" onclick="window.open('https://www.motechhq.com/connect/', '_blank');">
644
- <h4>Want Expert Guidance?</h4>
645
- <p style="margin-bottom: 0;">Schedule a free consultation with the learning design experts at Motivation Technologies today!</p>
646
- </div>
647
- """, unsafe_allow_html=True)
648
 
649
  # Footer
650
  st.markdown('<div class="footnote">', unsafe_allow_html=True)
 
40
  padding: 20px;
41
  background-color: white;
42
  margin-bottom: 20px;
43
+ min-height: 300px;
44
  }
45
  .format-card {
46
  border: 1px solid #e0e0e0;
 
508
  with col2:
509
  st.markdown('<div class="custom-subheader">Your Personalized Recommendations</div>', unsafe_allow_html=True)
510
 
511
+ # Always show the results container
512
+ st.markdown('<div class="results-container">', unsafe_allow_html=True)
513
+
514
  if generate_button and objectives and goals:
515
  with st.spinner("Analyzing your requirements..."):
516
  # Simulate processing time
 
541
 
542
  st.success("Analysis complete! Here are your recommendations:")
543
 
544
+ # Check if we have recommendations to display
545
  if st.session_state["recommendations"] is not None:
546
  recommendations = st.session_state["recommendations"]
547
 
 
 
548
  # Personalized headline
549
  st.markdown(f'<h3 style="color: #2c3e50; margin-bottom: 20px;">Recommended for {recommendations["params"]["audience"].lower()}:</h3>', unsafe_allow_html=True)
550
 
 
598
  else:
599
  st.markdown("*All relevant options are shown above.*")
600
 
 
 
601
  # Grouped Action Buttons
602
  st.markdown('<div class="action-buttons-container">', unsafe_allow_html=True)
603
  st.markdown("**Take Action:**", unsafe_allow_html=True)
 
612
  st.success("Excellent choice! Our learning design experts will be in touch within 24 hours.")
613
 
614
  with col_b2:
615
+ # Fixed consultation button using st.link_button
616
+ st.link_button(
617
+ "Schedule Free Consultation",
618
+ "https://www.motechhq.com/connect/",
619
+ use_container_width=True
620
+ )
 
621
 
622
  # New analysis button (full width, secondary action)
623
  st.markdown('<div style="margin-top: 10px;">', unsafe_allow_html=True)
 
629
  st.markdown('</div>', unsafe_allow_html=True)
630
 
631
  else:
632
+ # Show placeholder INSIDE the results container
 
633
  st.markdown('<div class="placeholder-area">', unsafe_allow_html=True)
634
  st.markdown('<h3>🎯 Your Recommendations Will Appear Here</h3>')
635
  st.markdown('<p>Complete the form and click "Get My Recommendations" to see your personalized training format suggestions.</p>')
636
  st.markdown('</div>', unsafe_allow_html=True)
637
+
638
+ # Close the results container
639
+ st.markdown('</div>', unsafe_allow_html=True)
640
+
641
+ # Consultation CTA outside the results container - only show when no recommendations
642
+ if st.session_state["recommendations"] is None:
643
  st.markdown('<div class="section-spacer"></div>', unsafe_allow_html=True)
644
+ st.link_button(
645
+ "Want Expert Guidance? Schedule a Free Consultation",
646
+ "https://www.motechhq.com/connect/",
647
+ use_container_width=True,
648
+ type="secondary"
649
+ )
650
 
651
  # Footer
652
  st.markdown('<div class="footnote">', unsafe_allow_html=True)