Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,8 +17,18 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 17 |
|
| 18 |
# --- Basic Agent Definition ---
|
| 19 |
|
| 20 |
-
llm = HuggingFaceEndpoint(repo_id="HuggingFaceTB/SmolLM-135M-Instruct")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
chat = ChatHuggingFace(llm=llm, verbose=True)
|
|
|
|
| 22 |
tools = [
|
| 23 |
search_tool
|
| 24 |
]
|
|
|
|
| 17 |
|
| 18 |
# --- Basic Agent Definition ---
|
| 19 |
|
| 20 |
+
#llm = HuggingFaceEndpoint(repo_id="HuggingFaceTB/SmolLM-135M-Instruct")
|
| 21 |
+
llm = HuggingFaceEndpoint(
|
| 22 |
+
repo_id="TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
| 23 |
+
task="text-generation", # for chat‐style use “text-generation”
|
| 24 |
+
max_new_tokens=1024,
|
| 25 |
+
do_sample=False,
|
| 26 |
+
repetition_penalty=1.03,
|
| 27 |
+
temperature=0,
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
chat = ChatHuggingFace(llm=llm, verbose=True)
|
| 31 |
+
|
| 32 |
tools = [
|
| 33 |
search_tool
|
| 34 |
]
|