Spaces:
Runtime error
Runtime error
Merge remote-tracking branch 'origin/main'
Browse files
utils.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import os
|
2 |
import pickle
|
|
|
3 |
|
4 |
import faiss
|
5 |
from langchain import HuggingFaceHub
|
@@ -15,7 +16,9 @@ from langchain.prompts.chat import (
|
|
15 |
)
|
16 |
from langchain.text_splitter import CharacterTextSplitter
|
17 |
from langchain.vectorstores.faiss import FAISS
|
|
|
18 |
|
|
|
19 |
|
20 |
global model_name
|
21 |
|
|
|
1 |
import os
|
2 |
import pickle
|
3 |
+
import langchain
|
4 |
|
5 |
import faiss
|
6 |
from langchain import HuggingFaceHub
|
|
|
16 |
)
|
17 |
from langchain.text_splitter import CharacterTextSplitter
|
18 |
from langchain.vectorstores.faiss import FAISS
|
19 |
+
from langchain.cache import InMemoryCache
|
20 |
|
21 |
+
langchain.llm_cache = InMemoryCache()
|
22 |
|
23 |
global model_name
|
24 |
|