Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def offset_calculation(prediction_length, rolling_windows, length):
|
|
19 |
row_offset = -1 * prediction_length * rolling_windows
|
20 |
if abs(row_offset) > 0.95 * length:
|
21 |
raise gr.Error("Reduce prediction_length * rolling_windows")
|
22 |
-
return row_offset
|
23 |
|
24 |
|
25 |
def preprocess(
|
@@ -56,7 +56,7 @@ def train_and_forecast(
|
|
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:
|
|
|
19 |
row_offset = -1 * prediction_length * rolling_windows
|
20 |
if abs(row_offset) > 0.95 * length:
|
21 |
raise gr.Error("Reduce prediction_length * rolling_windows")
|
22 |
+
return row_offset/2
|
23 |
|
24 |
|
25 |
def preprocess(
|
|
|
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:
|