Update app.py
Browse files
app.py
CHANGED
@@ -25,25 +25,27 @@ class BasicAgent:
|
|
25 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
26 |
return fixed_answer
|
27 |
|
|
|
28 |
def add(a: int, b: int) -> int:
|
29 |
"""Add two numbers"""
|
30 |
return a + b
|
31 |
|
32 |
-
|
33 |
def subtract(a: int, b: int) -> int:
|
34 |
"""Subtract two numbers"""
|
35 |
return a - b
|
36 |
|
37 |
-
|
38 |
def multiply(a: int, b: int) -> int:
|
39 |
"""Multiply two numbers"""
|
40 |
return a * b
|
41 |
|
42 |
-
|
43 |
def divide(a: int, b: int) -> int:
|
44 |
"""Divide two numbers"""
|
45 |
return a / b
|
46 |
|
|
|
47 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
48 |
"""
|
49 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
|
|
25 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
26 |
return fixed_answer
|
27 |
|
28 |
+
@tool
|
29 |
def add(a: int, b: int) -> int:
|
30 |
"""Add two numbers"""
|
31 |
return a + b
|
32 |
|
33 |
+
@tool
|
34 |
def subtract(a: int, b: int) -> int:
|
35 |
"""Subtract two numbers"""
|
36 |
return a - b
|
37 |
|
38 |
+
@tool
|
39 |
def multiply(a: int, b: int) -> int:
|
40 |
"""Multiply two numbers"""
|
41 |
return a * b
|
42 |
|
43 |
+
@tool
|
44 |
def divide(a: int, b: int) -> int:
|
45 |
"""Divide two numbers"""
|
46 |
return a / b
|
47 |
|
48 |
+
|
49 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
50 |
"""
|
51 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|