Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import requests
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
|
|
|
| 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})
|