QuantumLearner commited on
Commit
e41bdd0
·
verified ·
1 Parent(s): 6c34806

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -5,6 +5,7 @@ from ripser import Rips
5
  import persim
6
  import plotly.graph_objs as go
7
  import warnings
 
8
 
9
  # Function to fetch stock or crypto data
10
  def fetch_data(ticker_name, start_date, end_date):
@@ -54,13 +55,13 @@ with st.sidebar.expander("How to Use", expanded=False):
54
  """)
55
 
56
  # Input parameters inside an expander, open by default
57
- with st.expander("Input Parameters", expanded=True):
58
  ticker_name = st.text_input('Enter Stock or Crypto Symbol (e.g., AAPL or BTC-USD)', '^GSPC', help="Enter the ticker symbol for the stock or cryptocurrency you want to analyze.")
59
  start_date_string = st.date_input('Start Date', pd.to_datetime('2020-01-01'), help="Select the start date for the data range.")
60
  end_date_string = st.date_input('End Date', pd.to_datetime(pd.Timestamp.now().date() + pd.Timedelta(days=1)), help="Select the end date for the data range.")
61
 
62
  # Parameters for the selected method inside an expander, open by default
63
- with st.expander("Parameters", expanded=True):
64
  window_size = st.slider('Window Size', min_value=5, max_value=50, value=20, help="Set the window size for the sliding window analysis.")
65
  threshold = st.slider('Alert Threshold', min_value=0.05, max_value=0.2, value=0.075, step=0.005, help="Set the threshold for detecting significant changes in price dynamics.")
66
 
 
5
  import persim
6
  import plotly.graph_objs as go
7
  import warnings
8
+ import pandas as pd
9
 
10
  # Function to fetch stock or crypto data
11
  def fetch_data(ticker_name, start_date, end_date):
 
55
  """)
56
 
57
  # Input parameters inside an expander, open by default
58
+ with st.sidebar.expander("Input Parameters", expanded=True):
59
  ticker_name = st.text_input('Enter Stock or Crypto Symbol (e.g., AAPL or BTC-USD)', '^GSPC', help="Enter the ticker symbol for the stock or cryptocurrency you want to analyze.")
60
  start_date_string = st.date_input('Start Date', pd.to_datetime('2020-01-01'), help="Select the start date for the data range.")
61
  end_date_string = st.date_input('End Date', pd.to_datetime(pd.Timestamp.now().date() + pd.Timedelta(days=1)), help="Select the end date for the data range.")
62
 
63
  # Parameters for the selected method inside an expander, open by default
64
+ with st.sidebar.expander("Parameters", expanded=True):
65
  window_size = st.slider('Window Size', min_value=5, max_value=50, value=20, help="Set the window size for the sliding window analysis.")
66
  threshold = st.slider('Alert Threshold', min_value=0.05, max_value=0.2, value=0.075, step=0.005, help="Set the threshold for detecting significant changes in price dynamics.")
67