Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,7 +56,7 @@ async def lifespan(app: FastAPI):
|
|
| 56 |
print("🚀 Initializing models and prompt template...")
|
| 57 |
|
| 58 |
try:
|
| 59 |
-
GOOGLE_API_KEY = os.getenv("
|
| 60 |
print("🔑 gemini_api_key:", "FOUND" if GOOGLE_API_KEY else "NOT FOUND")
|
| 61 |
|
| 62 |
if not GOOGLE_API_KEY:
|
|
@@ -178,7 +178,7 @@ async def run_hackrx(req: RunRequest):
|
|
| 178 |
|
| 179 |
# Define the RAG chain using pre-loaded components
|
| 180 |
hybrid_rag_chain = (
|
| 181 |
-
{"context": itemgetter("full_query") |
|
| 182 |
| ml_models["prompt_template"]
|
| 183 |
| ml_models["llm"]
|
| 184 |
)
|
|
|
|
| 56 |
print("🚀 Initializing models and prompt template...")
|
| 57 |
|
| 58 |
try:
|
| 59 |
+
GOOGLE_API_KEY = os.getenv("gemini_api_key3")
|
| 60 |
print("🔑 gemini_api_key:", "FOUND" if GOOGLE_API_KEY else "NOT FOUND")
|
| 61 |
|
| 62 |
if not GOOGLE_API_KEY:
|
|
|
|
| 178 |
|
| 179 |
# Define the RAG chain using pre-loaded components
|
| 180 |
hybrid_rag_chain = (
|
| 181 |
+
{"context": itemgetter("full_query") | ensemble_retriever, "full_query": itemgetter("full_query")}
|
| 182 |
| ml_models["prompt_template"]
|
| 183 |
| ml_models["llm"]
|
| 184 |
)
|