mimi111222 commited on
Commit
95512f9
·
verified ·
1 Parent(s): 5a28e0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -284,8 +284,8 @@ st.markdown("""
284
  color: #1a1a1a;
285
  padding: 2rem;
286
  border-radius: 20px;
287
- margin: 1rem auto;
288
- max-width: 900px;
289
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
290
  animation: fadeIn 0.5s ease;
291
  border-left: 5px solid #667eea;
@@ -294,9 +294,9 @@ st.markdown("""
294
  .result-card p {
295
  word-break: break-word;
296
  overflow-wrap: break-word;
297
- max-height: 200px;
298
  overflow-y: auto;
299
- line-height: 1.6;
300
  }
301
 
302
  /* FIXED: Scrollable container for keywords with proper visibility */
@@ -665,18 +665,18 @@ with tab3:
665
  if len(sentences) == 0:
666
  st.warning("⚠️ Could not extract sentences from the text")
667
  else:
668
- questions = [f"What is the main concept in: '{s[:70]}...'?" for s in sentences if len(s) > 10]
669
 
670
  if questions:
671
- st.markdown('<div class="result-card">', unsafe_allow_html=True)
672
- st.markdown("<h4 style='color: #667eea;'>📝 Generated Quiz Questions</h4>", unsafe_allow_html=True)
673
- st.markdown('<div class="quiz-container">', unsafe_allow_html=True)
674
- for i, q in enumerate(questions, 1):
675
- st.markdown(f"""
676
- <div class='quiz-question-card'>
677
- <strong>Question {i}:</strong> <span style='color: white;'>{q}</span>
678
- </div>
679
- """, unsafe_allow_html=True)
680
  st.markdown('</div></div>', unsafe_allow_html=True)
681
  st.session_state["quiz"] = questions
682
  else:
 
284
  color: #1a1a1a;
285
  padding: 2rem;
286
  border-radius: 20px;
287
+ margin: 1rem auto; /* Changed: 0 to auto */
288
+ max-width: 900px; /* Added this line */
289
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
290
  animation: fadeIn 0.5s ease;
291
  border-left: 5px solid #667eea;
 
294
  .result-card p {
295
  word-break: break-word;
296
  overflow-wrap: break-word;
297
+ max-height: 200px; /* Changed: 300px to 200px */
298
  overflow-y: auto;
299
+ line-height: 1.6; /* Added this line */
300
  }
301
 
302
  /* FIXED: Scrollable container for keywords with proper visibility */
 
665
  if len(sentences) == 0:
666
  st.warning("⚠️ Could not extract sentences from the text")
667
  else:
668
+ questions = [f"What is the main concept in: '{s[:70]}'?" for s in sentences if len(s) > 10]
669
 
670
  if questions:
671
+ st.markdown("<h4 style='color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.3);'>📝 Generated Quiz Questions</h4>", unsafe_allow_html=True)
672
+ st.markdown('<div class="quiz-container">', unsafe_allow_html=True)
673
+ for i, q in enumerate(questions, 1):
674
+ st.markdown(f"""
675
+ <div class='quiz-question-card'>
676
+ <strong>Question {i}:</strong> <span style='color: white;'>{q}</span>
677
+ </div>
678
+ """, unsafe_allow_html=True)
679
+ st.markdown('</div>', unsafe_allow_html=True)
680
  st.markdown('</div></div>', unsafe_allow_html=True)
681
  st.session_state["quiz"] = questions
682
  else: