JimSnns commited on
Commit
da4fe9c
·
verified ·
1 Parent(s): 269605f

Update app.py

Browse files

Change the api key position

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,9 +11,6 @@ from Gradio_UI import GradioUI
11
  NEWSAPI_KEY = "be0caa3084bf4bdc9052203cb149d9e1"
12
  newsapi = NewsApiClient(api_key = NEWSAPI_KEY)
13
 
14
- # Conversion rate API
15
- API_URL = f"https://v6.exchangerate-api.com/v6/ac069b4cb2fe9f46d311de15/latest/{from_currency}"
16
-
17
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
18
  @tool
19
  def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
@@ -87,6 +84,9 @@ def convert_currency(amount: float, from_currency: str, to_currency: str) -> str
87
  # Fetch the latest exchange rates
88
  response = requests.get(API_URL)
89
 
 
 
 
90
  if response.status_code == 200:
91
  data = response.json()
92
 
 
11
  NEWSAPI_KEY = "be0caa3084bf4bdc9052203cb149d9e1"
12
  newsapi = NewsApiClient(api_key = NEWSAPI_KEY)
13
 
 
 
 
14
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
15
  @tool
16
  def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
 
84
  # Fetch the latest exchange rates
85
  response = requests.get(API_URL)
86
 
87
+ # Conversion rate API
88
+ API_URL = f"https://v6.exchangerate-api.com/v6/ac069b4cb2fe9f46d311de15/latest/{from_currency}"
89
+
90
  if response.status_code == 200:
91
  data = response.json()
92