Manglik-R commited on
Commit
ed30da8
1 Parent(s): 1d112a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -18,10 +18,8 @@ pc = Pinecone(api_key=pinecone_api_key)
18
 
19
  # Function to process PDF and set up chatbot
20
  def process_pdf(pdf_doc):
21
- # Save uploaded file
22
  filename = pdf_doc.name
23
- with open(filename, "wb") as f:
24
- f.write(pdf_doc.read())
25
 
26
  # Load PDF and create index
27
  loader = PyPDFLoader(filename)
 
18
 
19
  # Function to process PDF and set up chatbot
20
  def process_pdf(pdf_doc):
21
+ # Use the file path directly
22
  filename = pdf_doc.name
 
 
23
 
24
  # Load PDF and create index
25
  loader = PyPDFLoader(filename)