hardknee commited on
Commit
7f0cbd9
·
verified ·
1 Parent(s): 8a57897

Comment out get_nasa_neo_data

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -11,24 +11,24 @@ from tools.nasa_neo_data_fetcher import NASANeoDataFetcher
11
  from Gradio_UI import GradioUI
12
 
13
 
14
- @tool
15
- def get_nasa_neo_data(start_date:str, end_date:str) -> dict:
16
- """A function to get Near Earth Object (NEO) data from NASA API.
17
- Args:
18
- start_date: A string representing thestart date of the data to be fetched in. IMPORTANT: Follows ISO 8601 date convention YYYY-MM-DD using dash delimitation e.g. "2021-09-07"
19
- end_date: A string representing the end date of the data to be fetched. IMPORTANT: Follows ISO 8601 date convention YYYY-MM-DD using dash delimitation e.g. "2021-09-07"
20
- Returns: The data fetched from the API as a JSON-like dictionary.
21
- """
22
- root_url = "https://api.nasa.gov/neo/rest/v1/feed?"
23
- api_key = os.getenv("NASA_API_KEY")
24
- params = f"start_date={start_date}&end_date={end_date}&api_key={api_key}"
25
- url = root_url + params
26
- response = requests.get(url)
27
- if repr(response.status_code) == "200":
28
- data = response.json()
29
- return data
30
- else:
31
- return f"Error: {response.status_code}"
32
 
33
 
34
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
 
11
  from Gradio_UI import GradioUI
12
 
13
 
14
+ # @tool
15
+ # def get_nasa_neo_data(start_date:str, end_date:str) -> dict:
16
+ # """A function to get Near Earth Object (NEO) data from NASA API.
17
+ # Args:
18
+ # start_date: A string representing thestart date of the data to be fetched in. IMPORTANT: Follows ISO 8601 date convention YYYY-MM-DD using dash delimitation e.g. "2021-09-07"
19
+ # end_date: A string representing the end date of the data to be fetched. IMPORTANT: Follows ISO 8601 date convention YYYY-MM-DD using dash delimitation e.g. "2021-09-07"
20
+ # Returns: The data fetched from the API as a JSON-like dictionary.
21
+ # """
22
+ # root_url = "https://api.nasa.gov/neo/rest/v1/feed?"
23
+ # api_key = os.getenv("NASA_API_KEY")
24
+ # params = f"start_date={start_date}&end_date={end_date}&api_key={api_key}"
25
+ # url = root_url + params
26
+ # response = requests.get(url)
27
+ # if repr(response.status_code) == "200":
28
+ # data = response.json()
29
+ # return data
30
+ # else:
31
+ # return f"Error: {response.status_code}"
32
 
33
 
34
  # Below is an example of a tool that does nothing. Amaze us with your creativity !