Spaces:
Sleeping
Sleeping
Update analytics/ai_assistant.py
Browse files
analytics/ai_assistant.py
CHANGED
|
@@ -126,7 +126,7 @@ def _get_inference_client():
|
|
| 126 |
"HUGGINGFACE_API_TOKEN is required for AI assistant. "
|
| 127 |
"Set it in your environment before running the app."
|
| 128 |
)
|
| 129 |
-
return
|
| 130 |
|
| 131 |
|
| 132 |
def generate_ai_answer(question: str, df: pd.DataFrame, as_of_month: str = None, segment: str = None):
|
|
|
|
| 126 |
"HUGGINGFACE_API_TOKEN is required for AI assistant. "
|
| 127 |
"Set it in your environment before running the app."
|
| 128 |
)
|
| 129 |
+
return InferenceClient(model=HF_MODEL_ID, token=HF_TOKEN)
|
| 130 |
|
| 131 |
|
| 132 |
def generate_ai_answer(question: str, df: pd.DataFrame, as_of_month: str = None, segment: str = None):
|