Spaces:
Runtime error
Runtime error
Create new file
Browse files
app.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import joblib
|
2 |
+
import pandas as pd
|
3 |
+
import streamlit as st
|
4 |
+
|
5 |
+
model = joblib.load('model.joblib')
|
6 |
+
|
7 |
+
bool_list = [True,False]
|
8 |
+
|
9 |
+
def main():
|
10 |
+
st.title("Predict mobile price range")
|
11 |
+
|
12 |
+
with st.form("questionaire"):
|
13 |
+
battery_power = st.slider("Battery Power(mAh)",min_value = 0, max_value = 2000, step=int)
|
14 |
+
blue = st.selectbox("Have Bluetooth?",option = bool_list)
|
15 |
+
clock_speed = st.slider("Microprocessor clock speed",min_value = 0, max_value = 3, step=float)
|
16 |
+
dual_sim = st.selectbox("Have Dualsim?",option = bool_list)
|
17 |
+
four_g = st.selectbox("Have 4G?",option = bool_list)
|
18 |
+
m_dep = st.slider("Mobile Depth(cm)",min_value = 0.1, max_value = 1, step=float)
|
19 |
+
mobile_wt = st.slider("Mobile Weight(gram)",min_value = 50, max_value = 200, step=int)
|
20 |
+
n_cores = st.slider("Number of processor core",min_value = 1, max_value = 8, step=int)
|
21 |
+
px_height = st.slider("Resolution height(pixels)",min_value = 0, max_value = 1960, step=int)
|
22 |
+
px_width = st.slider("Resolution width(pixels)",min_value = 0, max_value = 2000, step=int)
|
23 |
+
ram = st.slider("Ram(Megabytes)",min_value = 256, max_value = 4096, step=int)
|
24 |
+
sc_h = st.slider("Screen height(cm)",min_value = 0, max_value = 20, step=int)
|
25 |
+
sc_w = st.slider("Screen width(cm)",min_value = 0, max_value = 20, step=int)
|
26 |
+
touch_screen = st.selectbox("Have touchscreen?",option = bool_list)
|
27 |
+
wifi = st.selectbox("Have wifi?",option = bool_list)
|