hidevscommunity commited on
Commit
9b1a3fa
·
verified ·
1 Parent(s): 8f98e89

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +75 -0
app.py ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import numpy as np
3
+ import pickle
4
+ import streamlit.components.v1 as components
5
+
6
+ # Load the pickled model
7
+ def load_model():
8
+ return pickle.load(open('Student_Marks_LinearRegresssionnew.pkl', 'rb')) #change
9
+
10
+ # Function for model prediction
11
+ def model_prediction(model, features):
12
+ predicted = str(model.predict(features)[0])
13
+ return predicted
14
+
15
+ def app_design():
16
+ # Add input fields for High, Open, and Low values
17
+ image = '38.png' #change
18
+ st.image(image, use_column_width=True)
19
+
20
+ st.subheader("Enter the following values:") #change
21
+
22
+ number_courses= st.number_input("number_courses")
23
+ time_study= st.number_input("time_study")
24
+
25
+
26
+ # Create a feature list from the user inputs
27
+ features = [[number_courses,time_study]]
28
+
29
+ # Load the model
30
+ model = load_model()
31
+
32
+ # Make a prediction when the user clicks the "Predict" button
33
+ if st.button('Predict Marks'):
34
+ predicted_value = model_prediction(model, features)
35
+
36
+ st.success(f"The demand for the stock is: {predicted_value}")
37
+
38
+
39
+ def about_hidevs():
40
+
41
+ components.html("""
42
+ <div>
43
+ <h4>🚀 Unlock Your Dream Job with HiDevs Community!</h4>
44
+ <p class="subtitle">🔍 Seeking the perfect job? HiDevs Community is your gateway to career success in the tech industry. Explore free expert courses, job-seeking support, and career transformation tips.</p>
45
+ <p class="subtitle">💼 We offer an upskill program in <b>Gen AI, Data Science, Machine Learning</b>, and assist startups in adopting <b>Gen AI</b> at minimal development costs.</p>
46
+ <p class="subtitle">🆓 Best of all, everything we offer is <b>completely free</b>! We are dedicated to helping society.</p>
47
+ <p class="subtitle">Book free of cost 1:1 mentorship on any topic of your choice — <a class="link" href="https://topmate.io/deepakchawla1307">topmate</a></p>
48
+ <p class="subtitle">✨ We dedicate over 30 minutes to each applicant’s resume, LinkedIn profile, mock interview, and upskill program. If you’d like our guidance, check out our services <a class="link" href="https://hidevscommunity.wixsite.com/hidevs">here</a></p>
49
+ <p class="subtitle">💡 Join us now, and turbocharge your career!</p>
50
+ <p class="subtitle"><a class="link" href="https://hidevscommunity.wixsite.com/hidevs" target="__blank">Website</a>
51
+ <a class="link" href="https://www.youtube.com/@HidevsCommunity1307/" target="__blank">YouTube</a>
52
+ <a class="link" href="https://www.instagram.com/hidevs_community/" target="__blank">Instagram</a>
53
+ <a class="link" href="https://medium.com/@hidevscommunity" target="__blank">Medium</a>
54
+ <a class="link" href="https://www.linkedin.com/company/hidevs-community/" target="__blank">LinkedIn</a>
55
+ <a class="link" href="https://github.com/hidevscommunity" target="__blank">GitHub</a></p>
56
+ </div>
57
+ """,
58
+ height=600)
59
+
60
+ def main():
61
+
62
+ # Set the app title and add your website name and logo
63
+ st.set_page_config(
64
+ page_title="Student Marks Prediction",
65
+ page_icon=":chart_with_upwards_trend:",
66
+ )
67
+
68
+ st.title("Welcome to our Student Marks Prediction App!")
69
+
70
+ app_design()
71
+ st.header("About HiDevs Community")
72
+ about_hidevs()
73
+
74
+ if __name__ == '__main__':
75
+ main()