import gradio as gr import codeFile as cd import openpyxl as pyxl def myFunction(dtaFl,shNm,nC,nR): flnm=cd.rowWise(dtaFl,shNm,nC,nR) return flNm demo = gr.Interface( myFunction, [ #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"), #gr.CheckboxGroup(["Friday", "Monday"], label="Check the boxes as appropriate if scheduling long weekend"), #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="Data File"), gr.Textbox(label="Sheet Name"), gr.Number(label="Number of Columns",precision=0), gr.Number(label="Number of Rows",precision=0) ], [ #gr.Dataframe( # headers=["Date", "trsxn", "symbol", "qt","price"], # datatype=["str", "str", "str", "number", "number"], # ), #gr.Textbox(label="dynamic import test"), gr.File(label="File With Transformed Data") ], description="Enter excel file, sheet name, named range name, to have the data changed into a row-wise orientation. Expects the first field to be the unique x1 value, and proceeding fields to have unique 'x2' headers, with cell containing the dependent y for x1 and x2. Then it returns a much longer list with only 3 columns: x1,x2,y", ) demo.launch()#Nice!