Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -231,18 +231,21 @@ def browse_webpage(url: str) -> str:
|
|
| 231 |
final_answer = FinalAnswerTool()
|
| 232 |
|
| 233 |
# ---------------------------------------------------------------------------
|
| 234 |
-
# Model —
|
| 235 |
-
#
|
| 236 |
-
# -
|
| 237 |
-
# -
|
| 238 |
-
#
|
|
|
|
|
|
|
| 239 |
# ---------------------------------------------------------------------------
|
| 240 |
model = HFModel(
|
| 241 |
model_id="meta-llama/Llama-3.3-70B-Instruct",
|
| 242 |
provider="together",
|
| 243 |
max_tokens=4096,
|
| 244 |
temperature=0.7,
|
| 245 |
-
|
|
|
|
| 246 |
)
|
| 247 |
|
| 248 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
|
|
|
| 231 |
final_answer = FinalAnswerTool()
|
| 232 |
|
| 233 |
# ---------------------------------------------------------------------------
|
| 234 |
+
# Model — Llama-3.3-70B via Together AI
|
| 235 |
+
#
|
| 236 |
+
# NOTE on anti-repetition parameters:
|
| 237 |
+
# - `repetition_penalty` is NOT supported by the OpenAI-compatible chat
|
| 238 |
+
# completions endpoint that HF Inference Providers use. It raises:
|
| 239 |
+
# "InferenceClient.chat_completion() got an unexpected keyword argument"
|
| 240 |
+
# - Use `frequency_penalty` / `presence_penalty` instead (range -2.0..2.0).
|
| 241 |
# ---------------------------------------------------------------------------
|
| 242 |
model = HFModel(
|
| 243 |
model_id="meta-llama/Llama-3.3-70B-Instruct",
|
| 244 |
provider="together",
|
| 245 |
max_tokens=4096,
|
| 246 |
temperature=0.7,
|
| 247 |
+
frequency_penalty=0.3,
|
| 248 |
+
presence_penalty=0.1,
|
| 249 |
)
|
| 250 |
|
| 251 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|