ploysuay commited on
Commit
3b2f43d
1 Parent(s): a5a59aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -55,27 +55,27 @@ def main():
55
  clicked = st.form_submit_button("Mobile prices")
56
  if clicked:
57
  result=model.predict(pd.DataFrame({"battery_power": [battery_power],
58
- "bluetooth": [bluetooth],
59
  "clock_speed": [clock_speed],
60
  "dual_sim": [dual_sim],
61
- "Front_Camera_mega_pixels": [Front_Camera_mega_pixels],
62
- "Has_4G": [Has_4G],
63
- "memory": [memory],
64
- "Mobile_Depth": [Mobile_Depth],
65
- "Weight": [Weight],
66
- "Number_of_cores_of_processor": [ Number_of_cores_of_processor],
67
- "Primary_Camera_mega_pixels": [Primary_Camera_mega_pixels],
68
- "Pixel_Resolution_Height": [Pixel_Resolution_Height],
69
- "Pixel_Resolution_Width": [Pixel_Resolution_Width],
70
  "ram": [ram],
71
- "Screen_Height_of_mobile_in_cm": [Screen_Height_of_mobile_in_cm],
72
- "Screen_Width_of_mobile_in_cm": [Screen_Width_of_mobile_in_cm],
73
- "longest_time_that_a_single_battery_charge_will_last_when_you_are": [longest_time_that_a_single_battery_charge_will_last_when_you_are],
74
- "Has_3G": [Has_3G],
75
- "Has_touch_screen": [Has_touch_screen],
76
- "Has_wifi": [Has_wifi]}))
77
  #result = '>50k' if result[0] == 1 else '<50k'
78
- st.success(f'Your predicted Mobile prices is {result}')
79
  if __name__ == "__main__":
80
  main()
81
  # Show prediction
 
55
  clicked = st.form_submit_button("Mobile prices")
56
  if clicked:
57
  result=model.predict(pd.DataFrame({"battery_power": [battery_power],
58
+ "blue": [bluetooth],
59
  "clock_speed": [clock_speed],
60
  "dual_sim": [dual_sim],
61
+ "fc": [Front_Camera_mega_pixels],
62
+ "four_g": [Has_4G],
63
+ "int_memory": [memory],
64
+ "m_dep": [Mobile_Depth],
65
+ "mobile_wt": [Weight],
66
+ "n_cores": [ Number_of_cores_of_processor],
67
+ "pc": [Primary_Camera_mega_pixels],
68
+ "px_height": [Pixel_Resolution_Height],
69
+ "px_width": [Pixel_Resolution_Width],
70
  "ram": [ram],
71
+ "sc_h": [Screen_Height_of_mobile_in_cm],
72
+ "sc_w": [Screen_Width_of_mobile_in_cm],
73
+ "talk_time": [longest_time_that_a_single_battery_charge_will_last_when_you_are],
74
+ "three_g": [Has_3G],
75
+ "touch_screen": [Has_touch_screen],
76
+ "wifi": [Has_wifi]}))
77
  #result = '>50k' if result[0] == 1 else '<50k'
78
+ st.success(f'Your predicted Mobile prices is {result[0]}')
79
  if __name__ == "__main__":
80
  main()
81
  # Show prediction