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()