samarthv commited on
Commit
71af6f7
1 Parent(s): 4931e74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,12 +4,15 @@ import numpy as np
4
  from sklearn.linear_model import LinearRegression
5
  import matplotlib.pyplot as plt
6
 
 
 
 
7
  # Load the stock data from the CSV files
8
  data1 = pd.read_csv('Google_test_data.csv')
9
  data2 = pd.read_csv('tesla.csv')
10
 
11
  # Combine the datasets into a dictionary
12
- datasets = {'Google': data1, 'Tesla': data2}
13
 
14
  # Get the user's dataset selection
15
  selected_dataset = st.selectbox('Select Dataset', list(datasets.keys()))
@@ -52,8 +55,5 @@ axes[2].set_xlabel('Date')
52
  axes[2].set_ylabel('Percentage Change')
53
  axes[2].set_title(f'{selected_dataset} Daily Percentage Change in Stock Prices')
54
 
55
- # Remove the Streamlit default layout
56
- st.set_page_config(layout="wide")
57
-
58
  # Display the graphs in Streamlit
59
  st.pyplot(fig)
 
4
  from sklearn.linear_model import LinearRegression
5
  import matplotlib.pyplot as plt
6
 
7
+ # Remove the Streamlit default layout
8
+ st.set_page_config(layout="wide")
9
+
10
  # Load the stock data from the CSV files
11
  data1 = pd.read_csv('Google_test_data.csv')
12
  data2 = pd.read_csv('tesla.csv')
13
 
14
  # Combine the datasets into a dictionary
15
+ datasets = {'Google': data1, 'Apple': data2}
16
 
17
  # Get the user's dataset selection
18
  selected_dataset = st.selectbox('Select Dataset', list(datasets.keys()))
 
55
  axes[2].set_ylabel('Percentage Change')
56
  axes[2].set_title(f'{selected_dataset} Daily Percentage Change in Stock Prices')
57
 
 
 
 
58
  # Display the graphs in Streamlit
59
  st.pyplot(fig)