Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,6 @@ import pytz
|
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
from skyfield.api import load, Topos
|
8 |
-
from skyfield.almanac import find_discrete, moon_phase_fraction
|
9 |
from Gradio_UI import GradioUI
|
10 |
|
11 |
# Define Zodiac signs and their boundaries
|
@@ -26,10 +25,9 @@ ZODIAC_SIGNS = [
|
|
26 |
|
27 |
@tool
|
28 |
def get_moon_position_in_zodiac() -> str:
|
29 |
-
"""A tool that calculates the current position of the Moon in the Zodiac.
|
30 |
-
"""
|
31 |
# Load astronomical data
|
32 |
-
planets = load('de421.bsp') #
|
33 |
ts = load.timescale()
|
34 |
|
35 |
# Get the current time in UTC
|
@@ -85,7 +83,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
85 |
|
86 |
agent = CodeAgent(
|
87 |
model=model,
|
88 |
-
tools=[final_answer, get_moon_position_in_zodiac], # Add the
|
89 |
max_steps=6,
|
90 |
verbosity_level=1,
|
91 |
grammar=None,
|
|
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
from skyfield.api import load, Topos
|
|
|
8 |
from Gradio_UI import GradioUI
|
9 |
|
10 |
# Define Zodiac signs and their boundaries
|
|
|
25 |
|
26 |
@tool
|
27 |
def get_moon_position_in_zodiac() -> str:
|
28 |
+
"""A tool that calculates the current position of the Moon in the Zodiac."""
|
|
|
29 |
# Load astronomical data
|
30 |
+
planets = load('de421.bsp') # Ensure this file is accessible
|
31 |
ts = load.timescale()
|
32 |
|
33 |
# Get the current time in UTC
|
|
|
83 |
|
84 |
agent = CodeAgent(
|
85 |
model=model,
|
86 |
+
tools=[final_answer, get_moon_position_in_zodiac], # Add the updated tool here
|
87 |
max_steps=6,
|
88 |
verbosity_level=1,
|
89 |
grammar=None,
|