Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- 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 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
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
|