NaimaAqeel commited on
Commit
8ab4823
·
verified ·
1 Parent(s): f7133fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -13,7 +13,7 @@ from langchain_community.embeddings import HuggingFaceEmbeddings
13
  from nltk.tokenize import sent_tokenize # Import for sentence segmentation
14
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
15
 
16
- # Function to extract text from a PDF file (same as before)
17
  def extract_text_from_pdf(pdf_path):
18
  # ...
19
 
@@ -80,9 +80,10 @@ def upload_files(files):
80
  index.add(np.array(embeddings))
81
 
82
  # Save the updated index and documents
 
83
  return "Files processed successfully"
84
  except Exception as e:
85
- print(
86
 
87
 
88
 
 
13
  from nltk.tokenize import sent_tokenize # Import for sentence segmentation
14
  from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
15
 
16
+ # Function to extract text from a PDF file
17
  def extract_text_from_pdf(pdf_path):
18
  # ...
19
 
 
80
  index.add(np.array(embeddings))
81
 
82
  # Save the updated index and documents
83
+ # ...
84
  return "Files processed successfully"
85
  except Exception as e:
86
+ print(f"Error processing files: {e}")
87
 
88
 
89