SamarthPujari commited on
Commit
22191b9
·
verified ·
1 Parent(s): d842d10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,10 +3,12 @@ import datetime
3
  import requests
4
  import pytz
5
  import yaml
 
6
  from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
 
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
  def get_current_weather(place: str)-> str: #it's import to specify the return type
@@ -15,7 +17,7 @@ def get_current_weather(place: str)-> str: #it's import to specify the return ty
15
  Args:
16
  place: A string representing a valid place (e.g., 'London/Paris')
17
  """
18
- api_key = "Weather_Token"
19
  url = "https://api.openweathermap.org/data/2.5/weather"
20
  params = {
21
  "q": place,
 
3
  import requests
4
  import pytz
5
  import yaml
6
+ import os
7
  from tools.final_answer import FinalAnswerTool
8
 
9
  from Gradio_UI import GradioUI
10
 
11
+ API_KEY = os.getenv("Weather_Token")
12
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
13
  @tool
14
  def get_current_weather(place: str)-> str: #it's import to specify the return type
 
17
  Args:
18
  place: A string representing a valid place (e.g., 'London/Paris')
19
  """
20
+ api_key = API_KEY
21
  url = "https://api.openweathermap.org/data/2.5/weather"
22
  params = {
23
  "q": place,