Sync local Space with Hub
Browse files
app.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pickle
|
| 3 |
+
|
| 4 |
+
st.title("Student Score Prediction Based On Study Hours")
|
| 5 |
+
hours=st.text_input('Enter study hours')
|
| 6 |
+
st.markdown(f"My input is : {hours}")
|
| 7 |
+
if st.button('Predict'):
|
| 8 |
+
if (len(hours)):
|
| 9 |
+
model=pickle.load(open('model.sav', 'rb'))
|
| 10 |
+
prediction=model.predict([[int(hours)]])
|
| 11 |
+
st.header(f'Predicted Score:{prediction[0]}')
|
| 12 |
+
else:
|
| 13 |
+
st.header('Please Enter Valid Data')
|