Update app.py
Browse files
app.py
CHANGED
@@ -93,25 +93,3 @@ def convert_schedule(file_path, direction):
|
|
93 |
|
94 |
# Return both DataFrame and download path
|
95 |
return display_df, output_filename
|
96 |
-
return display_df, output_filename
|
97 |
-
|
98 |
-
# Build Gradio interface and launch immediately for Hugging Face Spaces
|
99 |
-
iface = gr.Interface(
|
100 |
-
fn=convert_schedule,
|
101 |
-
inputs=[
|
102 |
-
gr.File(label='Upload Weekly Schedule (.xlsx)', file_count='single', type='filepath'),
|
103 |
-
gr.Radio(['A to B', 'B to A'], label='Convert Direction')
|
104 |
-
],
|
105 |
-
outputs=[
|
106 |
-
gr.Dataframe(label='Converted Schedule'),
|
107 |
-
gr.File(label='Download Converted Excel')
|
108 |
-
],
|
109 |
-
title='7-Day Schedule Converter',
|
110 |
-
description=(
|
111 |
-
'Upload a 7-column weekly schedule (Models vs Days) with merged or single headers, '
|
112 |
-
'then flip between Models→Texters or Texters→Models. Download the result as .xlsx.'
|
113 |
-
),
|
114 |
-
flagging_mode='never'
|
115 |
-
)
|
116 |
-
# Launch on 0.0.0.0:7860 for Spaces
|
117 |
-
iface.launch(server_name='0.0.0.0', server_port=7860)
|
|
|
93 |
|
94 |
# Return both DataFrame and download path
|
95 |
return display_df, output_filename
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|