Spaces:
Sleeping
Sleeping
Isabel Gwara
commited on
Commit
·
0463d1c
1
Parent(s):
b9d3192
Update app.py
Browse files
app.py
CHANGED
|
@@ -130,12 +130,10 @@ with open('info.md') as f:
|
|
| 130 |
with gr.Row():
|
| 131 |
with gr.Box():
|
| 132 |
inputls = []
|
| 133 |
-
for
|
| 134 |
# skip last column
|
| 135 |
if colname == final_colname:
|
| 136 |
continue
|
| 137 |
-
|
| 138 |
-
gr.Markdown("##Question " + str(num + 1))
|
| 139 |
|
| 140 |
# access categories dict if data is categorical
|
| 141 |
# otherwise, just use a number input
|
|
@@ -145,11 +143,12 @@ with open('info.md') as f:
|
|
| 145 |
else:
|
| 146 |
# add numerical input
|
| 147 |
inputls.append(gr.inputs.Number(label=colname))
|
|
|
|
| 148 |
|
| 149 |
-
gr.Markdown("
|
| 150 |
output = gr.Textbox(label="Your recommendation:")
|
| 151 |
|
| 152 |
-
gr.Markdown("
|
| 153 |
|
| 154 |
submit = gr.Button("Submit", variant="primary")
|
| 155 |
submit.click(fn=general_predictor, inputs=inputls, outputs=output)
|
|
|
|
| 130 |
with gr.Row():
|
| 131 |
with gr.Box():
|
| 132 |
inputls = []
|
| 133 |
+
for colname in data.columns:
|
| 134 |
# skip last column
|
| 135 |
if colname == final_colname:
|
| 136 |
continue
|
|
|
|
|
|
|
| 137 |
|
| 138 |
# access categories dict if data is categorical
|
| 139 |
# otherwise, just use a number input
|
|
|
|
| 143 |
else:
|
| 144 |
# add numerical input
|
| 145 |
inputls.append(gr.inputs.Number(label=colname))
|
| 146 |
+
gr.Markdown(" ⤵️⤵️")
|
| 147 |
|
| 148 |
+
gr.Markdown(" ⤵️⤵️")
|
| 149 |
output = gr.Textbox(label="Your recommendation:")
|
| 150 |
|
| 151 |
+
gr.Markdown(" ⤵️⤵️")
|
| 152 |
|
| 153 |
submit = gr.Button("Submit", variant="primary")
|
| 154 |
submit.click(fn=general_predictor, inputs=inputls, outputs=output)
|