Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -29,6 +29,7 @@ sentiment_analyzer = pipeline("sentiment-analysis")
|
|
29 |
def get_llm_hf_inference(model_id=model_id, max_new_tokens=128, temperature=0.1):
|
30 |
return HuggingFaceEndpoint(
|
31 |
repo_id=model_id,
|
|
|
32 |
max_new_tokens=max_new_tokens,
|
33 |
temperature=temperature,
|
34 |
token=os.getenv("HF_TOKEN") # Hugging Face API Token
|
|
|
29 |
def get_llm_hf_inference(model_id=model_id, max_new_tokens=128, temperature=0.1):
|
30 |
return HuggingFaceEndpoint(
|
31 |
repo_id=model_id,
|
32 |
+
task="text-generation", # Specify the task explicitly
|
33 |
max_new_tokens=max_new_tokens,
|
34 |
temperature=temperature,
|
35 |
token=os.getenv("HF_TOKEN") # Hugging Face API Token
|