Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ def extract_text_from_pdf(uploaded_file):
|
|
| 61 |
pdf_reader = PyPDF2.PdfReader(uploaded_file)
|
| 62 |
text = ""
|
| 63 |
for page in pdf_reader.pages:
|
| 64 |
-
text += page.extract_text() or ""
|
| 65 |
return text.strip()
|
| 66 |
except Exception as e:
|
| 67 |
st.error(f"Error reading the PDF: {e}")
|
|
@@ -100,7 +100,7 @@ st.sidebar.title("AI Solutions")
|
|
| 100 |
option = st.sidebar.selectbox(
|
| 101 |
"Choose a task",
|
| 102 |
["Text Summarization", "Question Answering", "Text Classification", "Language Translation"],
|
| 103 |
-
index=0
|
| 104 |
)
|
| 105 |
|
| 106 |
if option == "Text Summarization":
|
|
|
|
| 61 |
pdf_reader = PyPDF2.PdfReader(uploaded_file)
|
| 62 |
text = ""
|
| 63 |
for page in pdf_reader.pages:
|
| 64 |
+
text += page.extract_text() or ""
|
| 65 |
return text.strip()
|
| 66 |
except Exception as e:
|
| 67 |
st.error(f"Error reading the PDF: {e}")
|
|
|
|
| 100 |
option = st.sidebar.selectbox(
|
| 101 |
"Choose a task",
|
| 102 |
["Text Summarization", "Question Answering", "Text Classification", "Language Translation"],
|
| 103 |
+
index=0
|
| 104 |
)
|
| 105 |
|
| 106 |
if option == "Text Summarization":
|