Update app.py
Browse files
app.py
CHANGED
@@ -68,14 +68,14 @@ data_test1 = processed_data['data_test1']
|
|
68 |
data_test2 = processed_data['data_test2']
|
69 |
data_test3 = processed_data['data_test3']
|
70 |
|
71 |
-
|
72 |
|
73 |
|
74 |
# Summary dashboard
|
75 |
# Dự báo tỷ giá
|
76 |
forex_forecast = {
|
77 |
"Tuần": ["14/07-18/07"],
|
78 |
-
"Giá Trị Dự Báo (USD/VND)": ["26,093 – 26,144"],
|
79 |
"Biến Động": ["-0.075% - 0.121%"],
|
80 |
"Xu Hướng": ["Dao động và có thể giảm do những tín hiệu tích cực từ thuế quan và thị trường chứng khoán trong nước."]
|
81 |
}
|
@@ -102,7 +102,9 @@ mape3 = np.mean(np.abs(data_test3['Market price'] - data_test3['Forecast price']
|
|
102 |
|
103 |
|
104 |
backtest_data = {
|
105 |
-
"Tuần": ["
|
|
|
|
|
106 |
"MAE": [round(mae1,2), round(mae2,2), round(mae3,2)],
|
107 |
"MAPE (%)": [round(mape1,3), round(mape2,3), round(mape3,3)]
|
108 |
}
|
@@ -396,7 +398,7 @@ def create_word_report():
|
|
396 |
|
397 |
|
398 |
# Lưu file Word
|
399 |
-
report_title =
|
400 |
output_path = os.path.join(REPORT_FOLDER, report_title)
|
401 |
doc.save(output_path)
|
402 |
return output_path
|
|
|
68 |
data_test2 = processed_data['data_test2']
|
69 |
data_test3 = processed_data['data_test3']
|
70 |
|
71 |
+
#f'{data_fx['Forecast price'].min()} - {data_fx['Forecast price'].max()}'
|
72 |
|
73 |
|
74 |
# Summary dashboard
|
75 |
# Dự báo tỷ giá
|
76 |
forex_forecast = {
|
77 |
"Tuần": ["14/07-18/07"],
|
78 |
+
"Giá Trị Dự Báo (USD/VND)": [f'{data_fx['Forecast price'].min()} - {data_fx['Forecast price'].max()}'], #"26,093 – 26,144"],
|
79 |
"Biến Động": ["-0.075% - 0.121%"],
|
80 |
"Xu Hướng": ["Dao động và có thể giảm do những tín hiệu tích cực từ thuế quan và thị trường chứng khoán trong nước."]
|
81 |
}
|
|
|
102 |
|
103 |
|
104 |
backtest_data = {
|
105 |
+
"Tuần": [f"{data_test1.index.min().strftime('%d/%m/%Y')} - {data_test1.index.max().strftime('%d/%m/%Y')}",
|
106 |
+
f"{data_test2.index.min().strftime('%d/%m/%Y')} - {data_test2.index.max().strftime('%d/%m/%Y')}",
|
107 |
+
f"{data_test3.index.min().strftime('%d/%m/%Y')} - {data_test3.index.max().strftime('%d/%m/%Y')}"],
|
108 |
"MAE": [round(mae1,2), round(mae2,2), round(mae3,2)],
|
109 |
"MAPE (%)": [round(mape1,3), round(mape2,3), round(mape3,3)]
|
110 |
}
|
|
|
398 |
|
399 |
|
400 |
# Lưu file Word
|
401 |
+
report_title = "Bao_cao_Ty_Gia_va_Lai_Suat_Tuan_14-07-2025.docx"
|
402 |
output_path = os.path.join(REPORT_FOLDER, report_title)
|
403 |
doc.save(output_path)
|
404 |
return output_path
|