Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -135,8 +135,6 @@ def generate_full_schedule(creators_file_path, overnight_file_path, day_file_pat
|
|
| 135 |
except Exception as e:
|
| 136 |
return f"Error generating schedule: {e}"
|
| 137 |
|
| 138 |
-
|
| 139 |
-
|
| 140 |
# Gradio Interface
|
| 141 |
def app():
|
| 142 |
with gr.Blocks() as interface:
|
|
@@ -188,21 +186,22 @@ def app():
|
|
| 188 |
)
|
| 189 |
|
| 190 |
with gr.Tab("Generate Full Schedule"):
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
|
|
|
| 206 |
return interface
|
| 207 |
|
| 208 |
if __name__ == "__main__":
|
|
@@ -213,3 +212,4 @@ if __name__ == "__main__":
|
|
| 213 |
|
| 214 |
|
| 215 |
|
|
|
|
|
|
| 135 |
except Exception as e:
|
| 136 |
return f"Error generating schedule: {e}"
|
| 137 |
|
|
|
|
|
|
|
| 138 |
# Gradio Interface
|
| 139 |
def app():
|
| 140 |
with gr.Blocks() as interface:
|
|
|
|
| 186 |
)
|
| 187 |
|
| 188 |
with gr.Tab("Generate Full Schedule"):
|
| 189 |
+
creators_file = gr.File(label="Creators File", type="binary")
|
| 190 |
+
overnight_file = gr.File(label="Overnight File", type="binary")
|
| 191 |
+
day_file = gr.File(label="Day File", type="binary")
|
| 192 |
+
prime_file = gr.File(label="Prime File", type="binary")
|
| 193 |
+
|
| 194 |
+
generate_schedule_btn = gr.Button("Generate Full Schedule")
|
| 195 |
+
overnight_schedule_output = gr.Dataframe(label="Overnight Schedule", interactive=False)
|
| 196 |
+
day_schedule_output = gr.Dataframe(label="Day Schedule", interactive=False)
|
| 197 |
+
prime_schedule_output = gr.Dataframe(label="Prime Schedule", interactive=False)
|
| 198 |
+
|
| 199 |
+
generate_schedule_btn.click(
|
| 200 |
+
generate_full_schedule,
|
| 201 |
+
inputs=[creators_file, overnight_file, day_file, prime_file],
|
| 202 |
+
outputs=[overnight_schedule_output, day_schedule_output, prime_schedule_output]
|
| 203 |
+
)
|
| 204 |
+
|
| 205 |
return interface
|
| 206 |
|
| 207 |
if __name__ == "__main__":
|
|
|
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
+
|