Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,15 +70,29 @@ with open("agent.json", "r") as f:
|
|
| 70 |
model_config = agent_config["model"]["data"]
|
| 71 |
|
| 72 |
# === BUILD MODEL ===
|
| 73 |
-
model = LiteLLMModel(
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
temperature=0.5,
|
| 77 |
-
|
|
|
|
| 78 |
)
|
| 79 |
|
| 80 |
|
| 81 |
|
|
|
|
|
|
|
| 82 |
# === IMPORT TOOL FROM HUB ===
|
| 83 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 84 |
|
|
|
|
| 70 |
model_config = agent_config["model"]["data"]
|
| 71 |
|
| 72 |
# === BUILD MODEL ===
|
| 73 |
+
# model = LiteLLMModel(
|
| 74 |
+
# model_id="gemini/gemini-2.0-flash-lite",
|
| 75 |
+
# api_key=os.getenv("GEMINI_API_KEY"),
|
| 76 |
+
# temperature=0.5,
|
| 77 |
+
# max_tokens=1024,
|
| 78 |
+
# )
|
| 79 |
+
|
| 80 |
+
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
| 81 |
+
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud' (!!!)
|
| 82 |
+
|
| 83 |
+
model = HfApiModel(
|
| 84 |
+
model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 85 |
+
token=os.getenv("HF_TOKEN"),
|
| 86 |
+
max_tokens=2096,
|
| 87 |
temperature=0.5,
|
| 88 |
+
last_input_token_count=0,
|
| 89 |
+
last_output_token_count=0,
|
| 90 |
)
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
+
|
| 95 |
+
|
| 96 |
# === IMPORT TOOL FROM HUB ===
|
| 97 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 98 |
|