Rupesh386 commited on
Commit
d15c735
·
verified ·
1 Parent(s): f6736cd

Create App.py

Browse files
Files changed (1) hide show
  1. App.py +80 -0
App.py ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ '''
2
+ Author : Rupesh Garsondiya
3
+ github : @Rupeshgarsondiya
4
+ Organization : L.J University
5
+ '''
6
+
7
+ import http
8
+ import streamlit as st
9
+ from PIL import Image
10
+ from train import *
11
+ from test import *
12
+
13
+
14
+ # Centering the title using HTML and CSS
15
+
16
+
17
+
18
+ class Main:
19
+ def __init__(self) -> None:
20
+ pass
21
+
22
+ def run(self):
23
+
24
+ # Display the image from a URL
25
+ st.markdown(
26
+ """
27
+ <style>
28
+ .img-rounded {
29
+ border-radius: 15px;
30
+ width: 400px; /* Adjust the width as needed */
31
+ }
32
+
33
+ </style>
34
+ <div style="text-align: center;">
35
+ <img src="https://files.oaiusercontent.com/file-j5d0noa13fNCzctwMzacm7k9?se=2024-10-15T17%3A31%3A03Z&sp=r&sv=2024-08-04&sr=b&rscc=max-age%3D604800%2C%20immutable%2C%20private&rscd=attachment%3B%20filename%3D393b3cd9-2488-4f60-a1d7-52fe26428c8f.webp&sig=JSGn0KwxflHJ9MPWGzjpDn%2BzUTJxnMrSN2%2BrrTMhoLg%3D" class="img-rounded",><br>
36
+
37
+ """,
38
+ unsafe_allow_html=True
39
+ )
40
+ st.write()
41
+ st.write()
42
+
43
+
44
+ t = test()
45
+ t.predict_data()
46
+
47
+
48
+ st.markdown("[GitHub](https://github.com/Rupeshgarsondiya/Project-1) | <a href='https://www.linkedin.com/in/rupesh-garsondiya-919817275/' target='_blank'>Linkedin</a>",unsafe_allow_html=True)
49
+
50
+
51
+ # Add a LinkedIn profile hyperlink using HTML
52
+ st.markdown("", unsafe_allow_html=True)
53
+
54
+
55
+
56
+
57
+ # Add copyright notice at the bottom
58
+ st.markdown("<hr>", unsafe_allow_html=True) # Horizontal line to separate content
59
+ st.markdown(
60
+ "<b><p style='text-align: center; font-size: 12px;'>&copy; 2024 Rupesh Garsondiya. All Rights Reserved.</p>",
61
+ unsafe_allow_html=True
62
+ )
63
+
64
+
65
+ if __name__ == "__main__":
66
+
67
+
68
+
69
+ st.markdown("<h1 style='text-align: center;'><b>User behaviour classification on user Behaviour Dataset</b></h1>", unsafe_allow_html=True)
70
+
71
+ st.markdown("<p ><b> - About this project :</b></p>",unsafe_allow_html=True)
72
+ st.write(' - This project is a simple web application that uses a machine learning model to classify user behavior into different categories.')
73
+
74
+ st.write(' - The model is trained on a dataset of user behavior and can be used to predict the behavior of a new user based on their mobile data.')
75
+
76
+ run_obj = Main()
77
+ run_obj.run()
78
+
79
+ else :
80
+ print("This is a Streamlit app. Please run it using `streamlit run app.py `") # noqa: E501