destiratnakomala commited on
Commit
df849c5
·
verified ·
1 Parent(s): 98a377d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -51,8 +51,8 @@ if date_column in features:
51
 
52
  selected_features = st.multiselect("Select features for analysis", features)
53
 
54
- # Specify forecast period
55
- forecast_period = st.number_input("Enter forecast period in days", min_value=1, value=180)
56
 
57
  # Check if the necessary columns exist
58
  if target_variable and date_column in data.columns:
@@ -63,8 +63,8 @@ if target_variable and date_column in data.columns:
63
  model = Prophet()
64
  model.fit(train_data)
65
 
66
- # Make future predictions for the specified number of days
67
- future = model.make_future_dataframe(periods=forecast_period) # Predicting specified days into the future
68
  forecast = model.predict(future)
69
 
70
  # Display the forecast
 
51
 
52
  selected_features = st.multiselect("Select features for analysis", features)
53
 
54
+ # Specify forecast period in months
55
+ forecast_period_months = st.number_input("Enter forecast period in months", min_value=1, value=6)
56
 
57
  # Check if the necessary columns exist
58
  if target_variable and date_column in data.columns:
 
63
  model = Prophet()
64
  model.fit(train_data)
65
 
66
+ # Make future predictions for the specified number of months
67
+ future = model.make_future_dataframe(periods=forecast_period_months, freq='M') # Predicting specified months into the future
68
  forecast = model.predict(future)
69
 
70
  # Display the forecast