Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,11 +18,11 @@ def create_qa_system():
|
|
18 |
# 2. PDF Processing Function
|
19 |
def create_qa_system():
|
20 |
# File check
|
21 |
-
if not os.path.exists("
|
22 |
-
raise gr.Error("❌
|
23 |
|
24 |
# Load PDF
|
25 |
-
loader = PyMuPDFLoader("
|
26 |
documents = loader.load()
|
27 |
|
28 |
# Split text
|
|
|
18 |
# 2. PDF Processing Function
|
19 |
def create_qa_system():
|
20 |
# File check
|
21 |
+
if not os.path.exists("file.pdf"):
|
22 |
+
raise gr.Error("❌ file.pdf not found! Upload it in Space's Files tab")
|
23 |
|
24 |
# Load PDF
|
25 |
+
loader = PyMuPDFLoader("file.pdf")
|
26 |
documents = loader.load()
|
27 |
|
28 |
# Split text
|