DavidD003 commited on
Commit
77e52f7
·
1 Parent(s): 33c4983

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +40 -0
app.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import SchedBuilderUtyModule as tls
3
+ import SchedBuilderClasses as cls
4
+ import openpyxl as pyxl
5
+ import pandas as pd
6
+ import numpy as np
7
+ from copy import deepcopy
8
+
9
+ def myFunction(DaysToSched,DaysCrew,AssnFl,FTrefFl,TempRefFl,PollFl):
10
+ Acrew=DaysCrew
11
+ wkHrs=DaysToSched
12
+ mySched=tls.preProcessData(Acrew,wkHrs,FTrefFl,TempRefFl,AssnFl,PollFl)
13
+ mySched.evalAssnList()
14
+ mySched.proofEligVol()
15
+ sch=mySched.fillOutSched_v2()
16
+ flNm=sch.printToExcel()
17
+ return flNm
18
+
19
+ demo = gr.Interface(
20
+ myFunction,
21
+ [
22
+ gr.Radio([32, 40],label="Regular Work Hours This Week?"),
23
+ gr.Radio(["Bud","Blue"],label="Which crew is on A shift this week?"),
24
+ gr.File(label="Assignments List"),
25
+ # gr.File(label="Required Jobs List"),
26
+ gr.File(label="Full Time Refusal Sheet - COPY OF SHEET WITH VALUES, NO FORMULAS"),
27
+ gr.File(label="Temp Refusal Sheet - COPY OF SHEET WITH VALUES, NO FORMULAS"),
28
+ gr.File(label="Polling Sheet"),
29
+ ],
30
+ [
31
+ #gr.Dataframe(
32
+ # headers=["Date", "trsxn", "symbol", "qt","price"],
33
+ # datatype=["str", "str", "str", "number", "number"],
34
+ # ),
35
+ #gr.Textbox(label="dynamic import test"),
36
+ gr.File(label="Sched_File")
37
+ ],
38
+ description="Enter inputs for schedule building. Remember to review output for invalid assignments and disallow them in Defined Assignments List. See the documentation for more info.",
39
+ )
40
+ demo.launch()