gamaba commited on
Commit
16e7e4a
·
verified ·
1 Parent(s): 176207a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -92,24 +92,6 @@ with gr.Blocks(theme=gr.themes.Soft(), title="AB Elevators") as demo:
92
  </div>
93
  """)
94
 
95
- # --- Image Updates ---
96
- lift.change(
97
- fn=lambda x: get_image_path("Lift_Type", x),
98
- inputs=lift,
99
- outputs=lift_img
100
- )
101
-
102
- door_type.change(
103
- fn=lambda x: get_image_path("Door_Type", x),
104
- inputs=door_type,
105
- outputs=door_img
106
- )
107
-
108
- motor.change(
109
- fn=lambda x: get_image_path("Motor_Type", x),
110
- inputs=motor,
111
- outputs=motor_img
112
- )
113
 
114
  with gr.Row():
115
  with gr.Column():
@@ -157,6 +139,24 @@ with gr.Blocks(theme=gr.themes.Soft(), title="AB Elevators") as demo:
157
  output_price = gr.Markdown()
158
  output_status = gr.Markdown()
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
 
161
  predict_btn.click(
162
  fn=predict_price,
 
92
  </div>
93
  """)
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  with gr.Row():
97
  with gr.Column():
 
139
  output_price = gr.Markdown()
140
  output_status = gr.Markdown()
141
 
142
+ # --- Image Updates ---
143
+ lift.change(
144
+ fn=lambda x: get_image_path("Lift_Type", x),
145
+ inputs=lift,
146
+ outputs=lift_img
147
+ )
148
+
149
+ door_type.change(
150
+ fn=lambda x: get_image_path("Door_Type", x),
151
+ inputs=door_type,
152
+ outputs=door_img
153
+ )
154
+
155
+ motor.change(
156
+ fn=lambda x: get_image_path("Motor_Type", x),
157
+ inputs=motor,
158
+ outputs=motor_img
159
+ )
160
 
161
  predict_btn.click(
162
  fn=predict_price,