text: import pandas as pd
  import streamlit as st
  import json
  from datetime import datetime
  import pytz
  import os
  from pathlib import Path
  import shutil
  
  filename = ""
  
  historic_tickers_dir = os.path.join((os.getcwd()), "historic_ticker_data")
  
  for file in os.listdir():
      if file.endswith(".json"):
          filename = os.path.join(r"C:\Users\Admin\PycharmProjects\StockScraper", file)
          filename = str(Path(filename).stem + ".json")
  
  st.set_page_config(page_title="Stock ticker mentions", page_icon="random", layout='wide', initial_sidebar_state='auto')
  
  with open(filename, 'r') as f:
      data = json.load(f)
  
  data = {k: v for k, v in sorted(data.items(), key=lambda item: item[0])}
  
  df = pd.DataFrame({'Stock tickers': data})
  
  tz_NY = pytz.timezone('America/New_York')
  datetime_NY = datetime.now(tz_NY)
  time = datetime_NY.strftime("%B %d, %X, %Y")
  
  st.title("Wall St. Bets new stock ticker mentions: {} EST (New York)".format(time))
  
  st.markdown(
      "Web scraping program that tracks and visualizes stocks mentioned on Wall Street Bets in posts under the *New* filter. The data is clean in the sense that it ignores *Meme* tagged posts and only counts 1 stock ticker mention per comment (so if a long comments mentions the same ticker multiple times, it will only count as 1 mention per that comment). Updated every 6 hours.")
  
  st.bar_chart(df, width=2000, height=800, use_container_width=True)
  
  # st.dataframe(df, width=1600, height=350)
  
  st.table(df)
  