vhr1007
commited on
Commit
•
8411b7d
1
Parent(s):
b619001
bugs
Browse files
__pycache__/app.cpython-311.pyc
ADDED
Binary file (6.53 kB). View file
|
|
__pycache__/config.cpython-311.pyc
ADDED
Binary file (505 Bytes). View file
|
|
app.py
CHANGED
@@ -2,7 +2,7 @@ from huggingface_hub import login
|
|
2 |
from fastapi import FastAPI, Depends, HTTPException
|
3 |
import logging
|
4 |
from pydantic import BaseModel
|
5 |
-
from sentence_transformers import SentenceTransformer
|
6 |
from services.qdrant_searcher import QdrantSearcher
|
7 |
from services.openai_service import generate_rag_response
|
8 |
from utils.auth import token_required
|
@@ -23,7 +23,7 @@ hf_home_dir = os.environ["HF_HOME"]
|
|
23 |
if not os.path.exists(hf_home_dir):
|
24 |
os.makedirs(hf_home_dir)
|
25 |
|
26 |
-
# Setup logging
|
27 |
logging.basicConfig(level=logging.INFO)
|
28 |
|
29 |
# Load Hugging Face token from environment variable
|
@@ -47,7 +47,6 @@ if not qdrant_url or not access_token:
|
|
47 |
|
48 |
# Initialize the SentenceTransformer model with the cache directory managed by HF_HOME
|
49 |
try:
|
50 |
-
st_logging.set_verbosity_info()
|
51 |
encoder = SentenceTransformer('nomic-ai/nomic-embed-text-v1.5')
|
52 |
logging.info("Successfully loaded the SentenceTransformer model.")
|
53 |
except Exception as e:
|
|
|
2 |
from fastapi import FastAPI, Depends, HTTPException
|
3 |
import logging
|
4 |
from pydantic import BaseModel
|
5 |
+
from sentence_transformers import SentenceTransformer
|
6 |
from services.qdrant_searcher import QdrantSearcher
|
7 |
from services.openai_service import generate_rag_response
|
8 |
from utils.auth import token_required
|
|
|
23 |
if not os.path.exists(hf_home_dir):
|
24 |
os.makedirs(hf_home_dir)
|
25 |
|
26 |
+
# Setup logging using Python's standard logging library
|
27 |
logging.basicConfig(level=logging.INFO)
|
28 |
|
29 |
# Load Hugging Face token from environment variable
|
|
|
47 |
|
48 |
# Initialize the SentenceTransformer model with the cache directory managed by HF_HOME
|
49 |
try:
|
|
|
50 |
encoder = SentenceTransformer('nomic-ai/nomic-embed-text-v1.5')
|
51 |
logging.info("Successfully loaded the SentenceTransformer model.")
|
52 |
except Exception as e:
|
services/__pycache__/openai_service.cpython-311.pyc
ADDED
Binary file (2.65 kB). View file
|
|
services/__pycache__/qdrant_searcher.cpython-311.pyc
ADDED
Binary file (2.96 kB). View file
|
|