Engineer786 commited on
Commit
f299119
·
verified ·
1 Parent(s): 25dd8a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import streamlit as st
2
  import requests
3
 
4
- # API URL for currency conversion
5
- API_URL = "https://api.exchangerate.host/latest"
 
6
 
7
  def get_conversion_rate(from_currency, to_currency):
8
  response = requests.get(API_URL, params={"base": from_currency, "symbols": to_currency})
 
1
  import streamlit as st
2
  import requests
3
 
4
+ # Replace 'YOUR_API_KEY' with your actual API key
5
+ API_KEY = 'YOUR_API_KEY'
6
+ API_URL = f"https://api.exchangerate.host/latest?access_key={API_KEY}"
7
 
8
  def get_conversion_rate(from_currency, to_currency):
9
  response = requests.get(API_URL, params={"base": from_currency, "symbols": to_currency})