Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -54,6 +54,8 @@ def train_and_forecast(
|
|
54 |
df.sort_index(inplace=True)
|
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)
|
@@ -85,7 +87,7 @@ def train_and_forecast(
|
|
85 |
)
|
86 |
|
87 |
test_data = test_gen.generate_instances(
|
88 |
-
prediction_length=prediction_length
|
89 |
)
|
90 |
|
91 |
evaluator = Evaluator(num_workers=0)
|
|
|
54 |
df.sort_index(inplace=True)
|
55 |
except AttributeError:
|
56 |
raise gr.Error("Upload a file with the Upload button")
|
57 |
+
for i in range(prediction_length//2):
|
58 |
+
df.append({'ds': f'predict_{i}', 'y': 0})
|
59 |
|
60 |
row_offset = offset_calculation(prediction_length, rolling_windows, len(df))
|
61 |
# prediction_length += int(len(df) * 0.1)
|
|
|
87 |
)
|
88 |
|
89 |
test_data = test_gen.generate_instances(
|
90 |
+
prediction_length=prediction_length, windows=rolling_windows
|
91 |
)
|
92 |
|
93 |
evaluator = Evaluator(num_workers=0)
|