BillBojangeles2000 commited on
Commit
b810080
·
1 Parent(s): cc14a13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -144,8 +144,13 @@ if generate_quiz:
144
  questions = subjective_generator.generate_test(topic) # Use the user's input topic here
145
 
146
  # Filter out invalid and empty questions
147
- questions = [q for q in questions if q.strip() and q != "E x p l a"]
148
-
 
 
 
 
 
149
  # Ensure you have valid questions
150
  if not questions:
151
  st.write("No valid questions to process.")
 
144
  questions = subjective_generator.generate_test(topic) # Use the user's input topic here
145
 
146
  # Filter out invalid and empty questions
147
+ x = 0
148
+ for i in questions:
149
+ if len(i) == 1:
150
+ questions[x].pop()
151
+ x = x + 1
152
+ else:
153
+ x = x + 1
154
  # Ensure you have valid questions
155
  if not questions:
156
  st.write("No valid questions to process.")