1Bananas1 commited on
Commit
d6036a8
·
verified ·
1 Parent(s): 9b05825

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -10,17 +10,20 @@ from Gradio_UI import GradioUI
10
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
13
- def compute_derivative(expr_str:str, var_str: str = 'x')-> str: #it's import to specify the return type
14
- #Keep this format for the description / args / args description but feel free to modify the tool
15
- """A tool that computes the symbolic derivative of an expression
 
16
  Args:
17
- - expr_str: str - A string representing the expression (e.g., "x**2 + sin(x)")
18
- - var_str: str - The variable with respect to which to differentiate (default "x")
 
19
  """
20
  var = symbols(var_str)
21
  expr = sympify(expr_str)
22
  derivative = diff(expr, var)
23
- return derivative
 
24
 
25
  @tool
26
  def get_current_time_in_timezone(timezone: str) -> str:
 
10
 
11
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
13
+ def compute_derivative(expr_str: str, var_str: str = 'x') -> str:
14
+ """
15
+ A tool that computes the symbolic derivative of an expression.
16
+
17
  Args:
18
+ expr_str (str): A string representing the expression (e.g., "x**2 + sin(x)").
19
+ var_str (str): The variable with respect to which to differentiate (default: "x").
20
+
21
  """
22
  var = symbols(var_str)
23
  expr = sympify(expr_str)
24
  derivative = diff(expr, var)
25
+ return str(derivative)
26
+
27
 
28
  @tool
29
  def get_current_time_in_timezone(timezone: str) -> str: