Update optuna_dashboard/_app.py

Co-authored-by: Shuhei Watanabe <47781922+nabenabe0928@users.noreply.github.com>
This commit is contained in:
Hiroki Takizawa
2023-12-06 18:26:17 +09:00
committed by GitHub
co-authored by Shuhei Watanabe
parent f57bab2d7d
commit c9915ad12d
+1 -1
View File
@@ -487,7 +487,7 @@ def create_app(
writer.writerow(row)
# Set response headers
output_name = re.sub(r'[\\/:*?"<>|]+', "", study_name)
output_name = "-".join(re.sub(r'[\\/:*?"<>|]+', "", study_name).split(" "))
response.headers["Content-Type"] = "text/csv; chatset=cp932"
response.headers["Content-Disposition"] = f"attachment; filename={output_name}.csv"