Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
import os
|
| 2 |
-
import io
|
| 3 |
import pdfplumber
|
| 4 |
import re
|
| 5 |
import gradio as gr
|
|
@@ -20,7 +19,7 @@ def get_section(path, wanted_section, next_section):
|
|
| 20 |
print(wanted_section)
|
| 21 |
|
| 22 |
# Open the PDF file
|
| 23 |
-
doc = pdfplumber.open(
|
| 24 |
start_page = []
|
| 25 |
end_page = []
|
| 26 |
|
|
|
|
| 1 |
import os
|
|
|
|
| 2 |
import pdfplumber
|
| 3 |
import re
|
| 4 |
import gradio as gr
|
|
|
|
| 19 |
print(wanted_section)
|
| 20 |
|
| 21 |
# Open the PDF file
|
| 22 |
+
doc = pdfplumber.open(BytesIO(path))
|
| 23 |
start_page = []
|
| 24 |
end_page = []
|
| 25 |
|