Spaces:
Sleeping
Sleeping
Update the fibonachi function
Browse files
app.py
CHANGED
|
@@ -8,16 +8,15 @@ from tools.final_answer import FinalAnswerTool
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
@tool
|
| 11 |
-
def fibonacci(
|
| 12 |
"""A tool that get a position n, and tell you the Fibonacci number at that position in the sequence.
|
| 13 |
Args:
|
| 14 |
-
|
| 15 |
"""
|
| 16 |
-
number = int(n)
|
| 17 |
a, b = 0, 1
|
| 18 |
-
for _ in range(
|
| 19 |
a, b = b, a + b
|
| 20 |
-
return
|
| 21 |
|
| 22 |
|
| 23 |
@tool
|
|
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
@tool
|
| 11 |
+
def fibonacci(position:int) -> int:
|
| 12 |
"""A tool that get a position n, and tell you the Fibonacci number at that position in the sequence.
|
| 13 |
Args:
|
| 14 |
+
position: the position
|
| 15 |
"""
|
|
|
|
| 16 |
a, b = 0, 1
|
| 17 |
+
for _ in range(position):
|
| 18 |
a, b = b, a + b
|
| 19 |
+
return a
|
| 20 |
|
| 21 |
|
| 22 |
@tool
|