Spaces:
Runtime error
Runtime error
File size: 1,481 Bytes
77e52f7 daaea56 df5fec7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
import gradio as gr
import SchedBuilderUtyModule as tls
import SchedBuilderClasses as cls
import openpyxl as pyxl
import pandas as pd
import numpy as np
from copy import deepcopy
def myFunction(DaysToSched,DaysCrew,AssnFl,FTrefFl,TempRefFl,PollFl):
Acrew=DaysCrew
wkHrs=DaysToSched
mySched=tls.preProcessData(Acrew,wkHrs,FTrefFl,TempRefFl,AssnFl,PollFl)
mySched.evalAssnList()
mySched.proofEligVol()
sch=mySched.fillOutSched_v2()
flNm=sch.printToExcel()
return flNm
demo = gr.Interface(
myFunction,
[
gr.Radio([32, 40],label="Regular Work Hours This Week?"),
gr.Radio(["Bud","Blue"],label="Which crew is on A shift this week?"),
gr.File(label="Assignments List"),
# gr.File(label="Required Jobs List"),
gr.File(label="Full Time Refusal Sheet - COPY OF SHEET WITH VALUES, NO FORMULAS"),
gr.File(label="Temp Refusal Sheet - COPY OF SHEET WITH VALUES, NO FORMULAS"),
gr.File(label="Polling Sheet"),
],
[
#gr.Dataframe(
# headers=["Date", "trsxn", "symbol", "qt","price"],
# datatype=["str", "str", "str", "number", "number"],
# ),
#gr.Textbox(label="dynamic import test"),
gr.File(label="Sched_File")
],
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.",
)
demo.launch()
|