Abhisesh7 commited on
Commit
037848c
·
verified ·
1 Parent(s): fc3b29d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -185,4 +185,20 @@ def plot_stock_data(ticker, start_date, end_date):
185
  plt.show()
186
 
187
  return plt.gcf() # Return the current figure object for Gradio to display
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
 
 
185
  plt.show()
186
 
187
  return plt.gcf() # Return the current figure object for Gradio to display
188
+ print(f"Future dates length: {len(future_dates)}")
189
+ print(f"Future prices length: {len(future_prices)}")
190
+ def plot_stock_data(ticker, start_date, end_date):
191
+ # Your existing code to fetch data and make predictions...
192
+
193
+ # Check lengths of future_dates and future_prices
194
+ print(f"Future dates length: {len(future_dates)}")
195
+ print(f"Future prices length: {len(future_prices)}")
196
+
197
+ # Ensure they match
198
+ if len(future_dates) != len(future_prices):
199
+ raise ValueError("The length of future_dates and future_prices must match.")
200
+
201
+ plt.plot(future_dates, future_prices, label="Predicted Future Prices")
202
+ # Additional plotting code...
203
+
204