Spaces:
Runtime error
Runtime error
File size: 1,882 Bytes
ad65f86 dab5ba6 ad65f86 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
import os
os.system('pip install streamlit_analytics')
import streamlit as st
import streamlit_analytics
try:
streamlit_analytics.track(load_from_json="demand.json")
except:
pass
# Tickers to choose from
# Updated crypto tickers
tickers = ['BTC-USD', 'ETH-USD', 'BNB-USD', 'XRP-USD', 'ADA-USD', 'DOT-USD', 'DOGE-USD', 'SOL-USD']
# Image options for each crypto ticker
image_options = {
'BTC-USD': 'BTC-USD.jpg',
'ETH-USD': 'ETH-USD.jpg',
'BNB-USD': 'BNB-USD.jpg',
'XRP-USD': 'XRP-USD.jpg',
'ADA-USD': 'ADA-USD.jpg',
'DOT-USD': 'DOT-USD.jpg',
'DOGE-USD': 'DOGE-USD.jpg',
'SOL-USD': 'SOL-USD.jpg',
'DOT-USD': 'DOT-USD.jpg',
}
# Crypto names for each ticker
stock_names = {
'BTC-USD': 'Bitcoin',
'ETH-USD': 'Ethereum',
'BNB-USD': 'Binance Coin',
'XRP-USD': 'XRP',
'ADA-USD': 'Cardano',
'DOT-USD': 'Polkadot',
'DOGE-USD': 'Dogecoin',
'SOL-USD': 'Solana',
'DOT-USD': 'Polkadot',
}
st.title("Crypto Forecaster")
# Create a dropdown to select a ticker
with streamlit_analytics.track(save_to_json="demand.json"):
selected_ticker = st.selectbox("Select a ticker:", tickers)
# Display the image for the selected ticker
if selected_ticker:
image_path = image_options[selected_ticker]
image = st.image(image_path)
# Display the stock name for the selected ticker
stock_name = stock_names[selected_ticker]
st.write(f"Crypto name: {stock_name}")
st.markdown(":warning: The content of this website is for educational purposes and is not a financial advice")
st.markdown(":information_source: This model has been trained on the past 6 years of data until November 22nd, 2023 for each of the selected stocks. For a more comprehensive analysis with a different date range, access to thousands of stocks, hundreds of cryptocurrencies, and more up-to-date predictions, please visit our website: https://crypto.quu.fr")
|