kaxap commited on
Commit
a32a295
·
1 Parent(s): 72b0594

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -55,11 +55,6 @@ def train_and_forecast(
55
  except AttributeError:
56
  raise gr.Error("Upload a file with the Upload button")
57
 
58
- row_offset = offset_calculation(prediction_length, rolling_windows, len(df))
59
- # prediction_length += int(len(df) * 0.1)
60
- # try:
61
- # gluon_df = PandasDataset(df, target=df.columns[0])
62
- # except TypeError:
63
  freq = pd.infer_freq(df.index[:3])
64
  print(freq)
65
  date_range = pd.date_range(df.index[0], pd.DateOffset(months=prediction_length//2) + df.index[-1], freq=freq)
@@ -68,7 +63,12 @@ def train_and_forecast(
68
  print(new_df)
69
  gluon_df = PandasDataset(new_df, target=new_df.columns[0], freq=freq)
70
  print(gluon_df)
71
-
 
 
 
 
 
72
  training_data, test_gen = split(gluon_df, offset=row_offset)
73
 
74
  if distribution == "StudentT":
 
55
  except AttributeError:
56
  raise gr.Error("Upload a file with the Upload button")
57
 
 
 
 
 
 
58
  freq = pd.infer_freq(df.index[:3])
59
  print(freq)
60
  date_range = pd.date_range(df.index[0], pd.DateOffset(months=prediction_length//2) + df.index[-1], freq=freq)
 
63
  print(new_df)
64
  gluon_df = PandasDataset(new_df, target=new_df.columns[0], freq=freq)
65
  print(gluon_df)
66
+ row_offset = offset_calculation(prediction_length, rolling_windows, len(df))
67
+ # prediction_length += int(len(df) * 0.1)
68
+ # try:
69
+ # gluon_df = PandasDataset(df, target=df.columns[0])
70
+ # except TypeError:
71
+
72
  training_data, test_gen = split(gluon_df, offset=row_offset)
73
 
74
  if distribution == "StudentT":