Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
"
|
59 |
"clock_speed": [clock_speed],
|
60 |
"dual_sim": [dual_sim],
|
61 |
-
"
|
62 |
-
"
|
63 |
-
"
|
64 |
-
"
|
65 |
-
"
|
66 |
-
"
|
67 |
-
"
|
68 |
-
"
|
69 |
-
"
|
70 |
"ram": [ram],
|
71 |
-
"
|
72 |
-
"
|
73 |
-
"
|
74 |
-
"
|
75 |
-
"
|
76 |
-
"
|
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
|