Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -24,13 +24,14 @@ load_dotenv()
|
|
| 24 |
# Ensure that your HF_TOKEN is available as an environment variable
|
| 25 |
# If using a specific endpoint, verify it's correct.
|
| 26 |
|
| 27 |
-
print(f"DEBUG: HF_TOKEN value loaded: {'***' if os.getenv('HF_TOKEN') else 'None'}. Length: {len(os.getenv('HF_TOKEN')) if os.getenv('HF_TOKEN') else 'None'}")
|
| 28 |
llm = HuggingFaceEndpoint(
|
| 29 |
-
#endpoint_url="https://api-inference.huggingface.co/models/Meta-DeepLearning/llama-2-7b-chat-hf",
|
| 30 |
-
endpoint_url="https://api-inference.huggingface.co/models/meta-llama/Llama-2-7b-chat-hf",
|
| 31 |
#endpoint_url="https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.2",
|
| 32 |
#endpoint_url="https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta",
|
| 33 |
-
|
|
|
|
| 34 |
temperature=0.01, # Keep a low temperature for consistent tool-use decisions
|
| 35 |
)
|
| 36 |
|
|
|
|
| 24 |
# Ensure that your HF_TOKEN is available as an environment variable
|
| 25 |
# If using a specific endpoint, verify it's correct.
|
| 26 |
|
| 27 |
+
#print(f"DEBUG: HF_TOKEN value loaded: {'***' if os.getenv('HF_TOKEN') else 'None'}. Length: {len(os.getenv('HF_TOKEN')) if os.getenv('HF_TOKEN') else 'None'}")
|
| 28 |
llm = HuggingFaceEndpoint(
|
| 29 |
+
#endpoint_url="https://api-inference.huggingface.co/models/Meta-DeepLearning/llama-2-7b-chat-hf", VIEJO
|
| 30 |
+
#endpoint_url="https://api-inference.huggingface.co/models/meta-llama/Llama-2-7b-chat-hf",
|
| 31 |
#endpoint_url="https://api-inference.huggingface.co/models/mistralai/Mistral-7B-Instruct-v0.2",
|
| 32 |
#endpoint_url="https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta",
|
| 33 |
+
endpoint_url="https://api-inference.huggingface.co/models/google/flan-t5-small",
|
| 34 |
+
#huggingfacehub_api_token=os.getenv("HF_TOKEN"), # Si tu HF_TOKEN no se está cargando automáticamente, puedes añadirlo aquí:
|
| 35 |
temperature=0.01, # Keep a low temperature for consistent tool-use decisions
|
| 36 |
)
|
| 37 |
|