Knight-coderr commited on
Commit
1434106
·
verified ·
1 Parent(s): 652c625

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -160,7 +160,8 @@ if st.button("Predict"):
160
  format="YYYY-MM-DD"
161
  )
162
 
163
- filtered_data = stock_history[(stock_history['Date'] >= date_range[0]) & (stock_history['Date'] <= date_range[1])]
 
164
 
165
  with st.expander("Price vs Sentiment Trend"):
166
  fig1 = px.line(filtered_data, x='Date', y=['Close', 'Sentiment'],
 
160
  format="YYYY-MM-DD"
161
  )
162
 
163
+ filtered_data = stock_history[(stock_history['Date'] >= pd.to_datetime(date_range[0])) &
164
+ (stock_history['Date'] <= pd.to_datetime(date_range[1]))]
165
 
166
  with st.expander("Price vs Sentiment Trend"):
167
  fig1 = px.line(filtered_data, x='Date', y=['Close', 'Sentiment'],