Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,10 +23,10 @@ async def chat_endpoint(message: str = Form(...)):
|
|
| 23 |
llm_model_cache["llm"] = get_llm()
|
| 24 |
|
| 25 |
prediction = classification_modeL_cache["model"].predict(message)
|
| 26 |
-
|
| 27 |
|
| 28 |
result = llm_model_cache["llm"].invoke(
|
| 29 |
-
prompt.format(text=message, prediction=
|
| 30 |
|
| 31 |
if result:
|
| 32 |
return result.content
|
|
|
|
| 23 |
llm_model_cache["llm"] = get_llm()
|
| 24 |
|
| 25 |
prediction = classification_modeL_cache["model"].predict(message)
|
| 26 |
+
|
| 27 |
|
| 28 |
result = llm_model_cache["llm"].invoke(
|
| 29 |
+
prompt.format(text=message, positive_prob=prediction[0][1], negative_prob=prediction[0][0]))
|
| 30 |
|
| 31 |
if result:
|
| 32 |
return result.content
|