Spaces:
Sleeping
Sleeping
rameshmoorthy
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -20,15 +20,15 @@ from backend.query_llm import generate_hf, generate_openai
|
|
20 |
from backend.semantic_search import table, retriever
|
21 |
from huggingface_hub import InferenceClient
|
22 |
|
23 |
-
|
24 |
VECTOR_COLUMN_NAME = "vector"
|
25 |
TEXT_COLUMN_NAME = "text"
|
26 |
-
|
27 |
proj_dir = Path(__file__).parent
|
28 |
# Setting up the logging
|
29 |
logging.basicConfig(level=logging.INFO)
|
30 |
logger = logging.getLogger(__name__)
|
31 |
-
|
32 |
# Set up the template environment with the templates directory
|
33 |
env = Environment(loader=FileSystemLoader(proj_dir / 'templates'))
|
34 |
|
|
|
20 |
from backend.semantic_search import table, retriever
|
21 |
from huggingface_hub import InferenceClient
|
22 |
|
23 |
+
|
24 |
VECTOR_COLUMN_NAME = "vector"
|
25 |
TEXT_COLUMN_NAME = "text"
|
26 |
+
HF_TOKEN = getenv("HUGGING_FACE_HUB_TOKEN")
|
27 |
proj_dir = Path(__file__).parent
|
28 |
# Setting up the logging
|
29 |
logging.basicConfig(level=logging.INFO)
|
30 |
logger = logging.getLogger(__name__)
|
31 |
+
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1",token=HF_TOKEN)
|
32 |
# Set up the template environment with the templates directory
|
33 |
env = Environment(loader=FileSystemLoader(proj_dir / 'templates'))
|
34 |
|