Spaces:
Sleeping
Sleeping
Update predict_stress.py
Browse files- predict_stress.py +2 -2
predict_stress.py
CHANGED
|
@@ -11,11 +11,11 @@ from langchain_core.output_parsers import StrOutputParser
|
|
| 11 |
|
| 12 |
xgboostmodel_id = "Sannidhi/stress_prediction_xgboost_model"
|
| 13 |
xgboost_model = None
|
| 14 |
-
model_id="
|
| 15 |
generator = pipeline("text-generation", model=model_id)
|
| 16 |
|
| 17 |
|
| 18 |
-
def get_llm_response(prompt_text, model_id="
|
| 19 |
"""Generates a response from the Hugging Face model for a given prompt text."""
|
| 20 |
try:
|
| 21 |
llm = HuggingFaceEndpoint(
|
|
|
|
| 11 |
|
| 12 |
xgboostmodel_id = "Sannidhi/stress_prediction_xgboost_model"
|
| 13 |
xgboost_model = None
|
| 14 |
+
model_id="unsloth/Llama-3.2-1B-Instruct"
|
| 15 |
generator = pipeline("text-generation", model=model_id)
|
| 16 |
|
| 17 |
|
| 18 |
+
def get_llm_response(prompt_text, model_id="unsloth/Llama-3.2-1B-Instruct", max_new_tokens=256, temperature=0.5):
|
| 19 |
"""Generates a response from the Hugging Face model for a given prompt text."""
|
| 20 |
try:
|
| 21 |
llm = HuggingFaceEndpoint(
|