random2222 commited on
Commit
843339b
·
verified ·
1 Parent(s): 70e5847

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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("data.pdf"):
22
- raise gr.Error("❌ data.pdf not found! Upload it in Space's Files tab")
23
 
24
  # Load PDF
25
- loader = PyMuPDFLoader("data.pdf")
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