nolanzandi commited on
Commit
d9b72f5
·
verified ·
1 Parent(s): 535f75c

Add target blank to csv generation

Browse files
Files changed (1) hide show
  1. functions/chart_functions.py +1 -1
functions/chart_functions.py CHANGED
@@ -33,7 +33,7 @@ def table_generation_func(data: List[str], session_hash):
33
  csv_path = f'{dir_path}/data.csv'
34
  df.to_csv(csv_path)
35
  download_path = f'gradio_api/file/temp/{session_hash}/data.csv'
36
- html_table = df.to_html() + f'<p>Download as a <a href="{download_path}">CSV file</a></p>'
37
  print(html_table)
38
 
39
  return {"reply": html_table}
 
33
  csv_path = f'{dir_path}/data.csv'
34
  df.to_csv(csv_path)
35
  download_path = f'gradio_api/file/temp/{session_hash}/data.csv'
36
+ html_table = df.to_html() + f'<p>Download as a <a target="_blank" href="{download_path}">CSV file</a></p>'
37
  print(html_table)
38
 
39
  return {"reply": html_table}