Spaces:
Sleeping
Sleeping
Update analytics/ai_assistant.py
Browse files
analytics/ai_assistant.py
CHANGED
|
@@ -147,8 +147,8 @@ def generate_ai_answer(question: str, df: pd.DataFrame, as_of_month: str = None,
|
|
| 147 |
max_new_tokens= HF_MAX_TOKENS,
|
| 148 |
temperature= HF_TEMPERATURE,
|
| 149 |
top_k= 50,
|
| 150 |
-
top_p= 0.95
|
| 151 |
-
|
| 152 |
|
| 153 |
if isinstance(response, dict):
|
| 154 |
return response.get("generated_text") or response.get("text") or str(response)
|
|
|
|
| 147 |
max_new_tokens= HF_MAX_TOKENS,
|
| 148 |
temperature= HF_TEMPERATURE,
|
| 149 |
top_k= 50,
|
| 150 |
+
top_p= 0.95
|
| 151 |
+
)
|
| 152 |
|
| 153 |
if isinstance(response, dict):
|
| 154 |
return response.get("generated_text") or response.get("text") or str(response)
|