Update app.py
Browse files
app.py
CHANGED
@@ -31,12 +31,13 @@ from sklearn.metrics import silhouette_score
|
|
31 |
from scipy.stats import spearmanr
|
32 |
from functools import lru_cache
|
33 |
from langchain.retrievers import MultiQueryRetriever
|
34 |
-
from
|
35 |
from transformers import pipeline
|
36 |
from sklearn.model_selection import ParameterGrid
|
37 |
from tqdm import tqdm
|
38 |
import random
|
39 |
|
|
|
40 |
|
41 |
# NLTK Resource Download
|
42 |
def download_nltk_resources():
|
@@ -170,7 +171,7 @@ def optimize_query(query, llm_model, chunks, embedding_model, vector_store_type,
|
|
170 |
#)
|
171 |
#llm = HuggingFacePipeline(pipeline=pipe)
|
172 |
|
173 |
-
llm = HuggingFacePipeline(pipeline(model="HuggingFaceH4/zephyr-7b-beta"))
|
174 |
|
175 |
|
176 |
# Create a temporary vector store for query optimization
|
@@ -458,7 +459,7 @@ def optimize_query(query, llm_model, chunks, embedding_model, vector_store_type,
|
|
458 |
#)
|
459 |
#llm = HuggingFacePipeline(pipeline=pipe)
|
460 |
|
461 |
-
llm = HuggingFacePipeline(pipeline(model="HuggingFaceH4/zephyr-7b-beta"))
|
462 |
|
463 |
|
464 |
# Create a temporary vector store for query optimization
|
@@ -752,7 +753,7 @@ Provide your suggestions in a Python dictionary format."""
|
|
752 |
#)
|
753 |
#llm = HuggingFacePipeline(pipeline=pipe)
|
754 |
|
755 |
-
llm = HuggingFacePipeline(pipeline(model="HuggingFaceH4/zephyr-7b-beta"))
|
756 |
|
757 |
|
758 |
#llm = HuggingFacePipeline.from_model_id(
|
|
|
31 |
from scipy.stats import spearmanr
|
32 |
from functools import lru_cache
|
33 |
from langchain.retrievers import MultiQueryRetriever
|
34 |
+
from langchain_community.llms import HuggingFacePipeline
|
35 |
from transformers import pipeline
|
36 |
from sklearn.model_selection import ParameterGrid
|
37 |
from tqdm import tqdm
|
38 |
import random
|
39 |
|
40 |
+
llm = HuggingFacePipeline(pipeline(model="HuggingFaceH4/zephyr-7b-beta"))
|
41 |
|
42 |
# NLTK Resource Download
|
43 |
def download_nltk_resources():
|
|
|
171 |
#)
|
172 |
#llm = HuggingFacePipeline(pipeline=pipe)
|
173 |
|
174 |
+
#llm = HuggingFacePipeline(pipeline(model="HuggingFaceH4/zephyr-7b-beta"))
|
175 |
|
176 |
|
177 |
# Create a temporary vector store for query optimization
|
|
|
459 |
#)
|
460 |
#llm = HuggingFacePipeline(pipeline=pipe)
|
461 |
|
462 |
+
#llm = HuggingFacePipeline(pipeline(model="HuggingFaceH4/zephyr-7b-beta"))
|
463 |
|
464 |
|
465 |
# Create a temporary vector store for query optimization
|
|
|
753 |
#)
|
754 |
#llm = HuggingFacePipeline(pipeline=pipe)
|
755 |
|
756 |
+
#llm = HuggingFacePipeline(pipeline(model="HuggingFaceH4/zephyr-7b-beta"))
|
757 |
|
758 |
|
759 |
#llm = HuggingFacePipeline.from_model_id(
|