Update app.py
Browse files
app.py
CHANGED
|
@@ -81,7 +81,7 @@ if st.sidebar.button("Generate MCQs"):
|
|
| 81 |
st.error("Please upload a PDF file.")
|
| 82 |
else:
|
| 83 |
with st.spinner("Extracting text and generating MCQs..."):
|
| 84 |
-
text =
|
| 85 |
try:
|
| 86 |
response = mcq_chain.run(text=text, number=str(number_of_questions))
|
| 87 |
mcqs_json = json.loads(response[8:-3])
|
|
|
|
| 81 |
st.error("Please upload a PDF file.")
|
| 82 |
else:
|
| 83 |
with st.spinner("Extracting text and generating MCQs..."):
|
| 84 |
+
text = extract_text(pdf_file)
|
| 85 |
try:
|
| 86 |
response = mcq_chain.run(text=text, number=str(number_of_questions))
|
| 87 |
mcqs_json = json.loads(response[8:-3])
|