Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,8 +9,9 @@ def predict_marks(Hours_studied, Previous_Score, Extracurriculum_Activivities, S
|
|
| 9 |
"Predict the student marks based on the input data"
|
| 10 |
input_data = np.array([[Hours_studied, Previous_Score, Extracurriculum_Activivities, Sleep_Hours, Sample_Question]])
|
| 11 |
prediction = model.predict(input_data)
|
| 12 |
-
|
| 13 |
-
|
|
|
|
| 14 |
if prediction > 100:
|
| 15 |
prediction = 100
|
| 16 |
|
|
@@ -18,7 +19,15 @@ def predict_marks(Hours_studied, Previous_Score, Extracurriculum_Activivities, S
|
|
| 18 |
|
| 19 |
def main():
|
| 20 |
# Sidebar Welcome Note with Emojis
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
st.title("๐ Student Marks Predictor ๐")
|
| 24 |
|
|
@@ -31,15 +40,10 @@ def main():
|
|
| 31 |
Sample_Question = st.number_input("โ๏ธ Sample questions practiced", min_value=0, max_value=50, value=0)
|
| 32 |
|
| 33 |
# Sidebar interaction
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
Just enter how much you've studied (or napped ๐ด), and let the magic happen!
|
| 38 |
|
| 39 |
-
Remember, this AI never sleeps... but you should! ๐
|
| 40 |
-
""")
|
| 41 |
-
|
| 42 |
-
st.sidebar.markdown("---")
|
| 43 |
# Predict button
|
| 44 |
if st.button("๐ฎ Predict Your Marks"):
|
| 45 |
prediction = predict_marks(Hours_studied, Previous_Score, Extracurriculum_Activivities, Sleep_Hours, Sample_Question)
|
|
|
|
| 9 |
"Predict the student marks based on the input data"
|
| 10 |
input_data = np.array([[Hours_studied, Previous_Score, Extracurriculum_Activivities, Sleep_Hours, Sample_Question]])
|
| 11 |
prediction = model.predict(input_data)
|
| 12 |
+
prediction = round(float(prediction), 2)
|
| 13 |
+
|
| 14 |
+
# Ensure the prediction does not exceed 100
|
| 15 |
if prediction > 100:
|
| 16 |
prediction = 100
|
| 17 |
|
|
|
|
| 19 |
|
| 20 |
def main():
|
| 21 |
# Sidebar Welcome Note with Emojis
|
| 22 |
+
st.sidebar.title("๐ Welcome to the Marks Oracle! ๐")
|
| 23 |
+
st.sidebar.write("""
|
| 24 |
+
**Prepare to be amazed** as this super-genius AI predicts your future marks with the accuracy of a caffeinated fortune cookie.
|
| 25 |
+
Just enter how much you've studied (or napped ๐ด), and let the magic happen!
|
| 26 |
+
|
| 27 |
+
Remember, this AI never sleeps... but you should! ๐
|
| 28 |
+
""")
|
| 29 |
+
|
| 30 |
+
st.sidebar.markdown("---")
|
| 31 |
|
| 32 |
st.title("๐ Student Marks Predictor ๐")
|
| 33 |
|
|
|
|
| 40 |
Sample_Question = st.number_input("โ๏ธ Sample questions practiced", min_value=0, max_value=50, value=0)
|
| 41 |
|
| 42 |
# Sidebar interaction
|
| 43 |
+
if name:
|
| 44 |
+
st.sidebar.write(f"### Welcome, **{name}**! ๐")
|
| 45 |
+
st.sidebar.write("#### Let's check your upcoming marks by entering your details below.")
|
|
|
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
# Predict button
|
| 48 |
if st.button("๐ฎ Predict Your Marks"):
|
| 49 |
prediction = predict_marks(Hours_studied, Previous_Score, Extracurriculum_Activivities, Sleep_Hours, Sample_Question)
|