Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 17 |
|
| 18 |
# --- Basic Agent Definition ---
|
| 19 |
|
| 20 |
-
llm = HuggingFaceEndpoint(repo_id=
|
| 21 |
chat = ChatHuggingFace(llm=llm, verbose=True)
|
| 22 |
tools = [
|
| 23 |
search_tool
|
|
@@ -35,7 +35,7 @@ class AgentState(TypedDict):
|
|
| 35 |
|
| 36 |
class BasicAgent:
|
| 37 |
|
| 38 |
-
def __init__(self
|
| 39 |
self.graph = self._build_graph()
|
| 40 |
print("BasicAgent initialized.")
|
| 41 |
|
|
@@ -78,7 +78,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 78 |
|
| 79 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 80 |
try:
|
| 81 |
-
agent = BasicAgent(
|
| 82 |
except Exception as e:
|
| 83 |
print(f"Error instantiating agent: {e}")
|
| 84 |
return f"Error initializing agent: {e}", None
|
|
|
|
| 17 |
|
| 18 |
# --- Basic Agent Definition ---
|
| 19 |
|
| 20 |
+
llm = HuggingFaceEndpoint(repo_id="Qwen/Qwen2.5-Coder-32B-Instruct")
|
| 21 |
chat = ChatHuggingFace(llm=llm, verbose=True)
|
| 22 |
tools = [
|
| 23 |
search_tool
|
|
|
|
| 35 |
|
| 36 |
class BasicAgent:
|
| 37 |
|
| 38 |
+
def __init__(self):
|
| 39 |
self.graph = self._build_graph()
|
| 40 |
print("BasicAgent initialized.")
|
| 41 |
|
|
|
|
| 78 |
|
| 79 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 80 |
try:
|
| 81 |
+
agent = BasicAgent()
|
| 82 |
except Exception as e:
|
| 83 |
print(f"Error instantiating agent: {e}")
|
| 84 |
return f"Error initializing agent: {e}", None
|