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 tickers = ['AAPL', 'AMZN', 'NIO', 'AMD', 'NVDA', 'META', 'PLUG', 'INTC', 'FORD', 'TSLA', 'GOOGL'] # Image options for each ticker image_options = { 'AAPL': 'AAPL.jpg', 'AMZN': 'AMZN.jpg', 'NIO': 'NIO.jpg', 'AMD': 'AMD.jpg', 'NVDA': 'NVDA.jpg', 'META': 'META.jpg', 'PLUG': 'PLUG.jpg', 'INTC': 'INTC.jpg', 'FORD': 'FORD.jpg', 'TSLA': 'TSLA.jpg', 'GOOGL': 'GOOGL.jpg', } # Stock names for each ticker stock_names = { 'AAPL': 'Apple Inc.', 'AMZN': 'Amazon.com Inc.', 'NIO': 'NIO Inc.', 'AMD': 'Advanced Micro Devices Inc.', 'NVDA': 'NVIDIA Corporation', 'META': 'Meta Platforms Inc.', 'PLUG': 'Plug Power Inc.', 'INTC': 'Intel Corporation', 'FORD': 'Ford Motor Company', 'TSLA': 'Tesla Inc.', 'GOOGL': 'Alphabet Inc. (Google)', } st.title("Stock 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"Stock 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://stock.quu.fr")