Update app.py
Browse files
app.py
CHANGED
@@ -77,6 +77,7 @@ if st.sidebar.button("Generate MCQs"):
|
|
77 |
with st.spinner("Extracting text and generating MCQs..."):
|
78 |
text = extract_text_from_pdf(pdf_file)
|
79 |
try:
|
|
|
80 |
mcqs_json = json.loads(response[8:-3])
|
81 |
st.session_state.mcqs = mcqs_json
|
82 |
st.session_state.current_q = 0
|
|
|
77 |
with st.spinner("Extracting text and generating MCQs..."):
|
78 |
text = extract_text_from_pdf(pdf_file)
|
79 |
try:
|
80 |
+
response = mcq_chain.run(text=text, number=str(number_of_questions))
|
81 |
mcqs_json = json.loads(response[8:-3])
|
82 |
st.session_state.mcqs = mcqs_json
|
83 |
st.session_state.current_q = 0
|