feat: replace slider by number

#11
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -158,7 +158,7 @@ with demo:
158
 
159
  with gr.Row():
160
  with gr.Column():
161
- distance_home = gr.Slider(
162
  minimum=float(0),
163
  maximum=float(22000),
164
  step=1,
@@ -166,7 +166,7 @@ with demo:
166
  label="Distance from Home",
167
  info="How far was the purchase from your home (in km)?"
168
  )
169
- distance_last = gr.Slider(
170
  minimum=float(0),
171
  maximum=float(22000),
172
  step=1,
@@ -174,7 +174,7 @@ with demo:
174
  label="Distance from Last Transaction",
175
  info="Distance between this purchase and the last one (in km)?"
176
  )
177
- ratio = gr.Slider(
178
  minimum=float(0),
179
  maximum=float(10000),
180
  step=0.1,
 
158
 
159
  with gr.Row():
160
  with gr.Column():
161
+ distance_home = gr.Number(
162
  minimum=float(0),
163
  maximum=float(22000),
164
  step=1,
 
166
  label="Distance from Home",
167
  info="How far was the purchase from your home (in km)?"
168
  )
169
+ distance_last = gr.Number(
170
  minimum=float(0),
171
  maximum=float(22000),
172
  step=1,
 
174
  label="Distance from Last Transaction",
175
  info="Distance between this purchase and the last one (in km)?"
176
  )
177
+ ratio = gr.Number(
178
  minimum=float(0),
179
  maximum=float(10000),
180
  step=0.1,