inam09 commited on
Commit
7d4c9e8
·
verified ·
1 Parent(s): 3b50de3

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +5 -5
src/streamlit_app.py CHANGED
@@ -35,11 +35,11 @@ import torch # Import torch
35
  # # Load models
36
 
37
  # summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
38
- # qa_pipeline = pipeline("question-answering", model="distilbert-base-cased-distilled-squad", device=torch.device("cpu"))
39
- # embedding_model = HuggingFaceEmbeddings(model_name="all-MiniLM-L6-v2")
40
- # vector_dbs = {} # Dictionary to store multiple vector databases, keyed by document title
41
- # extracted_texts = {} # Dictionary to store extracted text, keyed by document title
42
- # current_doc_title = None
43
 
44
  # # ---------------------------------------------
45
  # # Extract text from PDF or Image
 
35
  # # Load models
36
 
37
  # summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
38
+ qa_pipeline = pipeline("question-answering", model="distilbert-base-cased-distilled-squad", device=torch.device("cpu"))
39
+ embedding_model = HuggingFaceEmbeddings(model_name="all-MiniLM-L6-v2")
40
+ vector_dbs = {} # Dictionary to store multiple vector databases, keyed by document title
41
+ extracted_texts = {} # Dictionary to store extracted text, keyed by document title
42
+ current_doc_title = None
43
 
44
  # # ---------------------------------------------
45
  # # Extract text from PDF or Image