Spaces:
Runtime error
Runtime error
Commit
·
b810080
1
Parent(s):
cc14a13
Update app.py
Browse files
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 |
-
|
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.")
|