Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,7 +57,7 @@ async def lifespan(app: FastAPI):
|
|
| 57 |
# cross_encoder_model = HuggingFaceCrossEncoder(model_name="BAAI/bge-reranker-large")
|
| 58 |
# ml_models["reranker_compressor"] = CrossEncoderReranker(model=cross_encoder_model, top_n=5)
|
| 59 |
ml_models["llm"] = ChatGoogleGenerativeAI(model="gemini-2.0-flash", api_key=GOOGLE_API_KEY)
|
| 60 |
-
"""
|
| 61 |
You are an expert decision maker Assistant in the domain such as insurance, legal compliance, human resources, and contract management.
|
| 62 |
Do not add any irrelevent information, also do not use bullet points, make it in a perfect sentence answer.
|
| 63 |
The customer has submitted a query. If the query has details about age , gender ,procedure ,location , policy duration, then parse it and understand the query properly
|
|
|
|
| 57 |
# cross_encoder_model = HuggingFaceCrossEncoder(model_name="BAAI/bge-reranker-large")
|
| 58 |
# ml_models["reranker_compressor"] = CrossEncoderReranker(model=cross_encoder_model, top_n=5)
|
| 59 |
ml_models["llm"] = ChatGoogleGenerativeAI(model="gemini-2.0-flash", api_key=GOOGLE_API_KEY)
|
| 60 |
+
ml_models["prompt_template"] = PromptTemplate.from_template("""
|
| 61 |
You are an expert decision maker Assistant in the domain such as insurance, legal compliance, human resources, and contract management.
|
| 62 |
Do not add any irrelevent information, also do not use bullet points, make it in a perfect sentence answer.
|
| 63 |
The customer has submitted a query. If the query has details about age , gender ,procedure ,location , policy duration, then parse it and understand the query properly
|