kreemyyyy commited on
Commit
1fd5317
·
verified ·
1 Parent(s): 41a9969

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -80,9 +80,10 @@ def convert_schedule(file_path, direction):
80
  result.index.name = None
81
  result.columns.name = None
82
 
83
- # 6. Save to Excel for download, specifying engine
84
  output_filename = f"converted_{uuid.uuid4().hex}.xlsx"
85
- output_path = os.path.join(os.getcwd(), output_filename)
 
86
  result.to_excel(output_path, engine='openpyxl', index=True)
87
 
88
  # Return both DataFrame and download path
@@ -110,4 +111,4 @@ def main():
110
  iface.launch(server_name='0.0.0.0', server_port=7860)
111
 
112
  if __name__ == '__main__':
113
- main()
 
80
  result.index.name = None
81
  result.columns.name = None
82
 
83
+ # 6. Save to Excel for download, specifying engine
84
  output_filename = f"converted_{uuid.uuid4().hex}.xlsx"
85
+ # Save under /mnt/data so HF Spaces can serve it
86
+ output_path = os.path.join('/mnt/data', output_filename)
87
  result.to_excel(output_path, engine='openpyxl', index=True)
88
 
89
  # Return both DataFrame and download path
 
111
  iface.launch(server_name='0.0.0.0', server_port=7860)
112
 
113
  if __name__ == '__main__':
114
+ main()