Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,12 +17,12 @@ def extract_text_from_pdf(pdf_path):
|
|
| 17 |
text += page.extract_text()
|
| 18 |
return text
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
| 22 |
-
pdf_path = os.path.join(current_dir, 'Getting_Started_with_Ubuntu_16.04.pdf') # Adjust as needed
|
| 23 |
|
| 24 |
# Extract text from the PDF
|
| 25 |
-
pdf_text = extract_text_from_pdf(pdf_path)
|
|
|
|
| 26 |
|
| 27 |
# Convert the text to a DataFrame
|
| 28 |
df = pd.DataFrame({'text': [pdf_text]})
|
|
|
|
| 17 |
text += page.extract_text()
|
| 18 |
return text
|
| 19 |
|
| 20 |
+
# Path to your PDF file
|
| 21 |
+
pdf_path = 'FridayMaster/UBANTUMANUAL/Getting Started with Ubuntu 16.04.pdf'
|
|
|
|
| 22 |
|
| 23 |
# Extract text from the PDF
|
| 24 |
+
pdf_text = extract_text_from_pdf(pdf_path)
|
| 25 |
+
|
| 26 |
|
| 27 |
# Convert the text to a DataFrame
|
| 28 |
df = pd.DataFrame({'text': [pdf_text]})
|