Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -217,7 +217,7 @@ num_questions = st.sidebar.number_input("Number of Questions", min_value=1, max_
|
|
| 217 |
if st.sidebar.button("Generate Questions"):
|
| 218 |
if "syllabus_text" in st.session_state:
|
| 219 |
with st.spinner("Generating questions..."):
|
| 220 |
-
|
| 221 |
question_type=question_type,
|
| 222 |
subject_name=subject_name,
|
| 223 |
instructor=instructor_name,
|
|
@@ -225,8 +225,9 @@ if st.sidebar.button("Generate Questions"):
|
|
| 225 |
institution=institution_name,
|
| 226 |
syllabus_context=st.session_state.syllabus_text,
|
| 227 |
num_questions=num_questions,
|
| 228 |
-
difficulty_level=difficulty
|
| 229 |
-
|
|
|
|
| 230 |
st.success("Questions generated successfully!")
|
| 231 |
else:
|
| 232 |
st.error("Please upload a syllabus or images first.")
|
|
|
|
| 217 |
if st.sidebar.button("Generate Questions"):
|
| 218 |
if "syllabus_text" in st.session_state:
|
| 219 |
with st.spinner("Generating questions..."):
|
| 220 |
+
questions = generate_questions(
|
| 221 |
question_type=question_type,
|
| 222 |
subject_name=subject_name,
|
| 223 |
instructor=instructor_name,
|
|
|
|
| 225 |
institution=institution_name,
|
| 226 |
syllabus_context=st.session_state.syllabus_text,
|
| 227 |
num_questions=num_questions,
|
| 228 |
+
difficulty_level=difficulty
|
| 229 |
+
)
|
| 230 |
+
st.session_state.questions = questions # Ensure this line is properly indented
|
| 231 |
st.success("Questions generated successfully!")
|
| 232 |
else:
|
| 233 |
st.error("Please upload a syllabus or images first.")
|