DavidD003 commited on
Commit
0804d79
1 Parent(s): 5f2f82a

Create new file

Browse files
Files changed (1) hide show
  1. app.py +35 -0
app.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import codeFile as cd
3
+ import openpyxl as pyxl
4
+
5
+ def myFunction(dtaFl,shNm,rnNm):
6
+ flnm=cd.rowWise(dtaFl,shNm,rnNm)
7
+ return flNm
8
+
9
+ demo = gr.Interface(
10
+ myFunction,
11
+ [
12
+ #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"),
13
+ #gr.CheckboxGroup(["Friday", "Monday"], label="Check the boxes as appropriate if scheduling long weekend"),
14
+ #gr.Radio([32, 40],label="Regular Work Hours This Week?"),
15
+ #gr.Radio(["Bud","Blue"],label="Which crew is on A shift this week?"),
16
+ #gr.File(label="Assignments List"),
17
+ # gr.File(label="Required Jobs List"),
18
+ #gr.File(label="Full Time Refusal Sheet - COPY OF SHEET WITH VALUES, NO FORMULAS"),
19
+ #gr.File(label="Temp Refusal Sheet - COPY OF SHEET WITH VALUES, NO FORMULAS"),
20
+ gr.File(label="Data File"),
21
+ gr.Textbox(label="Sheet Name"),
22
+ gr.Textbox(label="Named Range Name")
23
+ ],
24
+ [
25
+ #gr.Dataframe(
26
+ # headers=["Date", "trsxn", "symbol", "qt","price"],
27
+ # datatype=["str", "str", "str", "number", "number"],
28
+ # ),
29
+ #gr.Textbox(label="dynamic import test"),
30
+ gr.File(label="File With Transformed Data")
31
+ ],
32
+ 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",
33
+ )
34
+
35
+ demo.launch()#Nice!