Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,9 +66,11 @@ def train_and_forecast(
|
|
66 |
buffer = io.BytesIO()
|
67 |
new_df.to_csv(buffer, index=False)
|
68 |
buffer.seek(0)
|
69 |
-
|
|
|
|
|
70 |
print(new_df)
|
71 |
-
gluon_df = PandasDataset(
|
72 |
print(gluon_df)
|
73 |
row_offset = offset_calculation(prediction_length, rolling_windows, len(df))
|
74 |
# prediction_length += int(len(df) * 0.1)
|
|
|
66 |
buffer = io.BytesIO()
|
67 |
new_df.to_csv(buffer, index=False)
|
68 |
buffer.seek(0)
|
69 |
+
df = pd.read_csv(buffer)
|
70 |
+
df.sort_index(inplace=True)
|
71 |
+
df.columns = ['ds', 'y']
|
72 |
print(new_df)
|
73 |
+
gluon_df = PandasDataset(df, target=df.columns[0], freq=freq)
|
74 |
print(gluon_df)
|
75 |
row_offset = offset_calculation(prediction_length, rolling_windows, len(df))
|
76 |
# prediction_length += int(len(df) * 0.1)
|