Update app.py
Browse files
app.py
CHANGED
@@ -17,32 +17,11 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
17 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
18 |
class BasicAgent:
|
19 |
def __init__(self):
|
20 |
-
# self.model = HfApiModel(
|
21 |
-
# max_tokens=2096,
|
22 |
-
# temperature=0.5,
|
23 |
-
# # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
24 |
-
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
|
25 |
-
# custom_role_conversions=None,
|
26 |
-
# )
|
27 |
-
# self.final_answer = FinalAnswerTool()
|
28 |
-
# self.agent = CodeAgent(
|
29 |
-
# model=self.model,
|
30 |
-
# tools=[self.final_answer], ## add your tools here (don't remove final answer)
|
31 |
-
# max_steps=6,
|
32 |
-
# verbosity_level=1,
|
33 |
-
# grammar=None,
|
34 |
-
# planning_interval=None,
|
35 |
-
# name=None,
|
36 |
-
# description=None,
|
37 |
-
# # prompt_templates=prompt_templates
|
38 |
-
# )
|
39 |
print("BasicAgent initialized.")
|
40 |
print(f"Agent answered me sumthin: {self.agent('How are you today?')}")
|
41 |
def __call__(self, question: str) -> str:
|
42 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
43 |
fixed_answer = "This is a default answer."
|
44 |
-
# fixed_answer = self.agent(question)
|
45 |
-
# print(f"Agent answered How are you today as: {self.agent.run('How are you today?')}")
|
46 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
47 |
return fixed_answer
|
48 |
|
|
|
17 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
18 |
class BasicAgent:
|
19 |
def __init__(self):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
print("BasicAgent initialized.")
|
21 |
print(f"Agent answered me sumthin: {self.agent('How are you today?')}")
|
22 |
def __call__(self, question: str) -> str:
|
23 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
24 |
fixed_answer = "This is a default answer."
|
|
|
|
|
25 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
26 |
return fixed_answer
|
27 |
|