Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ data2 = pd.read_csv('tesla.csv')
|
|
15 |
datasets = {'Google': data1, 'Tesla': data2}
|
16 |
|
17 |
# Get the user's dataset selection
|
18 |
-
selected_dataset = st.selectbox('Select Stock', list(datasets.keys()))
|
19 |
|
20 |
# Retrieve the selected dataset
|
21 |
selected_data = datasets[selected_dataset]
|
@@ -58,7 +58,7 @@ axes[2].set_title(f'{selected_dataset} Daily Percentage Change in Stock Prices')
|
|
58 |
# Add a submit button
|
59 |
if st.button('Submit'):
|
60 |
# Get the updated dataset selection
|
61 |
-
selected_dataset = st.selectbox('Select Stock', list(datasets.keys()))
|
62 |
|
63 |
# Retrieve the updated dataset
|
64 |
selected_data = datasets[selected_dataset]
|
|
|
15 |
datasets = {'Google': data1, 'Tesla': data2}
|
16 |
|
17 |
# Get the user's dataset selection
|
18 |
+
selected_dataset = st.selectbox('Select Stock', list(datasets.keys()), key='dataset_selection')
|
19 |
|
20 |
# Retrieve the selected dataset
|
21 |
selected_data = datasets[selected_dataset]
|
|
|
58 |
# Add a submit button
|
59 |
if st.button('Submit'):
|
60 |
# Get the updated dataset selection
|
61 |
+
selected_dataset = st.selectbox('Select Stock', list(datasets.keys()), key='dataset_selection')
|
62 |
|
63 |
# Retrieve the updated dataset
|
64 |
selected_data = datasets[selected_dataset]
|