Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -6
src/streamlit_app.py
CHANGED
@@ -34,12 +34,13 @@ nltk.download('punkt_tab', download_dir=nltk_data_dir, quiet=True)
|
|
34 |
|
35 |
# Load models
|
36 |
# summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6", device=torch.device("cpu"))
|
37 |
-
summarizer = pipeline(
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
)
|
|
|
43 |
qa_pipeline = pipeline("question-answering", model="distilbert-base-cased-distilled-squad", device=torch.device("cpu"))
|
44 |
embedding_model = HuggingFaceEmbeddings(model_name="all-MiniLM-L6-v2")
|
45 |
vector_dbs = {} # Dictionary to store multiple vector databases, keyed by document title
|
|
|
34 |
|
35 |
# Load models
|
36 |
# summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6", device=torch.device("cpu"))
|
37 |
+
# summarizer = pipeline(
|
38 |
+
# "summarization",
|
39 |
+
# model="sshleifer/distilbart-cnn-12-6",
|
40 |
+
# from_flax=True,
|
41 |
+
# device=-1 # CPU mode, use device=0 for GPU
|
42 |
+
# )
|
43 |
+
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
44 |
qa_pipeline = pipeline("question-answering", model="distilbert-base-cased-distilled-squad", device=torch.device("cpu"))
|
45 |
embedding_model = HuggingFaceEmbeddings(model_name="all-MiniLM-L6-v2")
|
46 |
vector_dbs = {} # Dictionary to store multiple vector databases, keyed by document title
|