Update app.py
Browse files
app.py
CHANGED
@@ -75,17 +75,15 @@ def plot_and_predict(zip, start_year, start_month, prediction_months):
|
|
75 |
mode="lines",
|
76 |
name="Predicted Prices"
|
77 |
)
|
78 |
-
|
79 |
-
# Plot prediction intervals
|
80 |
-
fig.add_traces([
|
81 |
-
go.Scatter(x=future_dates, y=upper_bound.flatten(), mode='lines', name='Upper Bound', line=dict(width=0)),
|
82 |
-
go.Scatter(x=future_dates, y=lower_bound.flatten(), mode='lines', name='Lower Bound', line=dict(width=0), fill='tonexty')
|
83 |
-
])
|
84 |
|
85 |
# Plot data
|
86 |
fig = go.Figure()
|
87 |
fig.add_trace(historical_prices_trace)
|
88 |
fig.add_trace(predicted_prices_trace)
|
|
|
|
|
|
|
|
|
89 |
fig.update_layout(
|
90 |
title=f"Real Estate Price Prediction for Zip Code {zip}",
|
91 |
xaxis_title="Date",
|
|
|
75 |
mode="lines",
|
76 |
name="Predicted Prices"
|
77 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
# Plot data
|
80 |
fig = go.Figure()
|
81 |
fig.add_trace(historical_prices_trace)
|
82 |
fig.add_trace(predicted_prices_trace)
|
83 |
+
fig.add_traces([
|
84 |
+
go.Scatter(x=future_dates, y=upper_bound.flatten(), mode='lines', name='Upper Bound', line=dict(width=0)),
|
85 |
+
go.Scatter(x=future_dates, y=lower_bound.flatten(), mode='lines', name='Lower Bound', line=dict(width=0), fill='tonexty')
|
86 |
+
])
|
87 |
fig.update_layout(
|
88 |
title=f"Real Estate Price Prediction for Zip Code {zip}",
|
89 |
xaxis_title="Date",
|