Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,12 +12,13 @@ from langchain_community.llms import CTransformers
|
|
| 12 |
from ctransformers import AutoModelForCausalLM
|
| 13 |
from langchain.llms import HuggingFaceHub
|
| 14 |
from transformers import AutoTokenizer
|
|
|
|
| 15 |
# from dotenv import load_dotenv
|
| 16 |
|
| 17 |
# load_dotenv()
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
def get_vector_store_from_url(url):
|
| 23 |
model_name = "BAAI/bge-large-en"
|
|
|
|
| 12 |
from ctransformers import AutoModelForCausalLM
|
| 13 |
from langchain.llms import HuggingFaceHub
|
| 14 |
from transformers import AutoTokenizer
|
| 15 |
+
import os
|
| 16 |
# from dotenv import load_dotenv
|
| 17 |
|
| 18 |
# load_dotenv()
|
| 19 |
|
| 20 |
+
os.environ['HUGGINGFACEHUB_API_TOKEN'] = os.getenv("HF_KEY")
|
| 21 |
+
|
| 22 |
|
| 23 |
def get_vector_store_from_url(url):
|
| 24 |
model_name = "BAAI/bge-large-en"
|