DavidD003 commited on
Commit
ccded01
1 Parent(s): b39fe63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -25
app.py CHANGED
@@ -46,29 +46,29 @@ with gr.Blocks() as demo:
46
  with gr.Column():
47
  A_fl_PT=gr.File(label="Primed Template File")
48
  A_tx_PTtimestamp=gr.Textbox(label="File Change Timestamp - Primed Template",placeholder="Waiting for file")
49
- A_bt_PT = gr.Button("Prime Visual Template")
50
- with gr.Tab("B - Scheduler"):
51
- gr.Markdown("On this tab the inputs are used to generate a weekend schedule. The Template and refusal sheet files are carried over (with slightly garbled names) when generated using tab A. The schedule is considered 'primed' when the tables on the secondary sheets match what is indicated on the visual template. The other inputs on this sheet should be selected per the circumstances. For example. If Friday is part of the weekend to be scheduled, Select '32 hrs', 'Friday', and 'yes to WWF scheduling'. Normal non-long weekend will not assign OT to WWF, and be 40 hour weeks without Friday or Monday to be scheduled.")
52
- with gr.Row():
53
- B_fl_FTref=gr.File(label="Full Time Refusals Sheet")
54
- B_fl_Tref=gr.File(label="Temp Refusal Sheet")
55
- with gr.Row():
56
- with gr.Column():
57
- B_fl_PT=gr.File(label="Primed Template File")
58
- B_tx_PTtimestamp=gr.Textbox(label="File Change Timestamp - Primed Template",placeholder="Waiting for file")
59
- with gr.Column():
60
- with gr.Row():
61
- B_fl_Pl=gr.File(label="Polling File")
62
- with gr.Tab("Non-File Inputs"):
63
- with gr.Row():
64
- B_wwfOT=gr.Radio(["Yes", "No"],label="Assign OT to WWF? (If 'yes', WWF will be considered for filling in slots beyond their prescribed shifts in the Assignment List)")
65
- B_dayCrew=gr.Radio(["Bud","Blue"],label="Which crew is on A shift this week?")
66
- with gr.Row():
67
- B_wkHrs=gr.Radio([32, 40],label="Regular Work Hours This Week?")
68
- B_xtraDay=gr.CheckboxGroup(["Friday", "Monday"], label="Check the boxes as appropriate if scheduling long weekend")
69
- B_bt_MS = gr.Button("Generate Schedule")
70
- B_fl_FS=gr.File(label="Generated Schedule")
71
- B_tx_FTtimestamp=gr.Textbox(label="File Change Timestamp - Completed Schedule",placeholder="Waiting for first run")
72
  #with gr.Tab("C - Review"):
73
  #with gr.Tab("Inspect Template"):
74
  #gr.Markdown("On this tab you can have the program generate a schedule using only the template file so as to confirm the template was entered correctly for program interpretation. This process builds the template using all inputs present in tab B. Inputs are required for building the template.")
@@ -87,7 +87,7 @@ with gr.Blocks() as demo:
87
 
88
  #######################
89
  #Third Define the Interactions
90
- A_bt_PT.click(PrimeVisualTemplate,[A_fl_VT,A_fl_FTref,A_fl_Tref],[A_fl_PT,B_fl_PT,A_tx_PTtimestamp,B_tx_PTtimestamp,B_fl_FTref,B_fl_Tref])
91
- B_bt_MS.click(GenerateSchedule,[B_wwfOT,B_xtraDay,B_wkHrs,B_dayCrew,B_fl_PT,B_fl_FTref,B_fl_Tref,B_fl_Pl],[B_fl_FS,B_tx_FTtimestamp])
92
  #C_bt_MT.click(GenerateSchedule,[B_wwfOT,B_xtraDay,B_wkHrs,B_dayCrew,B_fl_PT,B_fl_FTref,B_fl_Tref,B_fl_Pl],[C_fl_T,C_tx_Ttimestamp])
93
  demo.launch(inline=False)
 
46
  with gr.Column():
47
  A_fl_PT=gr.File(label="Primed Template File")
48
  A_tx_PTtimestamp=gr.Textbox(label="File Change Timestamp - Primed Template",placeholder="Waiting for file")
49
+ #A_bt_PT = gr.Button("Prime Visual Template")
50
+ #with gr.Tab("B - Scheduler"):
51
+ #gr.Markdown("On this tab the inputs are used to generate a weekend schedule. The Template and refusal sheet files are carried over (with slightly garbled names) when generated using tab A. The schedule is considered 'primed' when the tables on the secondary sheets match what is indicated on the visual template. The other inputs on this sheet should be selected per the circumstances. For example. If Friday is part of the weekend to be scheduled, Select '32 hrs', 'Friday', and 'yes to WWF scheduling'. Normal non-long weekend will not assign OT to WWF, and be 40 hour weeks without Friday or Monday to be scheduled.")
52
+ #with gr.Row():
53
+ #B_fl_FTref=gr.File(label="Full Time Refusals Sheet")
54
+ #B_fl_Tref=gr.File(label="Temp Refusal Sheet")
55
+ #with gr.Row():
56
+ #with gr.Column():
57
+ #B_fl_PT=gr.File(label="Primed Template File")
58
+ #B_tx_PTtimestamp=gr.Textbox(label="File Change Timestamp - Primed Template",placeholder="Waiting for file")
59
+ #with gr.Column():
60
+ #with gr.Row():
61
+ #B_fl_Pl=gr.File(label="Polling File")
62
+ #with gr.Tab("Non-File Inputs"):
63
+ #with gr.Row():
64
+ #B_wwfOT=gr.Radio(["Yes", "No"],label="Assign OT to WWF? (If 'yes', WWF will be considered for filling in slots beyond their prescribed shifts in the Assignment List)")
65
+ #B_dayCrew=gr.Radio(["Bud","Blue"],label="Which crew is on A shift this week?")
66
+ #with gr.Row():
67
+ #B_wkHrs=gr.Radio([32, 40],label="Regular Work Hours This Week?")
68
+ #B_xtraDay=gr.CheckboxGroup(["Friday", "Monday"], label="Check the boxes as appropriate if scheduling long weekend")
69
+ #B_bt_MS = gr.Button("Generate Schedule")
70
+ #B_fl_FS=gr.File(label="Generated Schedule")
71
+ #B_tx_FTtimestamp=gr.Textbox(label="File Change Timestamp - Completed Schedule",placeholder="Waiting for first run")
72
  #with gr.Tab("C - Review"):
73
  #with gr.Tab("Inspect Template"):
74
  #gr.Markdown("On this tab you can have the program generate a schedule using only the template file so as to confirm the template was entered correctly for program interpretation. This process builds the template using all inputs present in tab B. Inputs are required for building the template.")
 
87
 
88
  #######################
89
  #Third Define the Interactions
90
+ #A_bt_PT.click(PrimeVisualTemplate,[A_fl_VT,A_fl_FTref,A_fl_Tref],#[A_fl_PT,B_fl_PT,A_tx_PTtimestamp,B_tx_PTtimestamp,B_fl_FTref,B_fl_Tref])
91
+ #B_bt_MS.click(GenerateSchedule,[B_wwfOT,B_xtraDay,B_wkHrs,B_dayCrew,B_fl_PT,B_fl_FTref,B_fl_Tref,B_fl_Pl],[B_fl_FS,B_tx_FTtimestamp])
92
  #C_bt_MT.click(GenerateSchedule,[B_wwfOT,B_xtraDay,B_wkHrs,B_dayCrew,B_fl_PT,B_fl_FTref,B_fl_Tref,B_fl_Pl],[C_fl_T,C_tx_Ttimestamp])
93
  demo.launch(inline=False)