Spaces:
Runtime error
Runtime error
Update
Browse files- app.py +7 -1
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -3,7 +3,6 @@ import os
|
|
| 3 |
import json
|
| 4 |
import chromadb
|
| 5 |
from chromadb.config import Settings
|
| 6 |
-
from sentence_transformers import SentenceTransformer
|
| 7 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 8 |
from langchain.schema import HumanMessage, SystemMessage
|
| 9 |
import time
|
|
@@ -17,6 +16,13 @@ import re
|
|
| 17 |
from dotenv import load_dotenv
|
| 18 |
import os
|
| 19 |
from huggingface_hub import hf_hub_download
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
st.set_page_config(
|
|
|
|
| 3 |
import json
|
| 4 |
import chromadb
|
| 5 |
from chromadb.config import Settings
|
|
|
|
| 6 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 7 |
from langchain.schema import HumanMessage, SystemMessage
|
| 8 |
import time
|
|
|
|
| 16 |
from dotenv import load_dotenv
|
| 17 |
import os
|
| 18 |
from huggingface_hub import hf_hub_download
|
| 19 |
+
import huggingface_hub
|
| 20 |
+
|
| 21 |
+
# Legacy fix for old sentence-transformers expecting HfFolder
|
| 22 |
+
if not hasattr(huggingface_hub, "HfFolder"):
|
| 23 |
+
huggingface_hub.HfFolder = None
|
| 24 |
+
|
| 25 |
+
from sentence_transformers import SentenceTransformer
|
| 26 |
|
| 27 |
|
| 28 |
st.set_page_config(
|
requirements.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
streamlit
|
| 2 |
sentence-transformers==2.2.2
|
| 3 |
transformers==4.28.1
|
| 4 |
-
huggingface_hub
|
| 5 |
chromadb
|
| 6 |
langchain
|
| 7 |
langchain-google-genai
|
|
|
|
| 1 |
streamlit
|
| 2 |
sentence-transformers==2.2.2
|
| 3 |
transformers==4.28.1
|
| 4 |
+
huggingface_hub>=0.20.0
|
| 5 |
chromadb
|
| 6 |
langchain
|
| 7 |
langchain-google-genai
|