kanneboinakumar commited on
Commit
e55aa8b
·
verified ·
1 Parent(s): ad15103

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +59 -20
app.py CHANGED
@@ -4,28 +4,67 @@ import torch.nn as nn
4
  import torch.nn.functional as F
5
  import base64
6
 
7
- # Function to set background image
8
- def set_background(image_file):
9
- with open(image_file, "rb") as image:
10
- encoded_string = base64.b64encode(image.read()).decode()
11
- st.markdown(
12
- f"""
13
- <style>
14
- .stApp {{
15
- background-image: url(data:image/png;base64,{encoded_string});
16
- background-size: cover;
17
- background-attachment: fixed;
18
- }}
19
- </style>
20
- """,
21
- unsafe_allow_html=True
22
- )
23
 
24
- # Set the background image
25
- # set_background('path_to_your_image.png')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- # Custom title with blue color
28
- st.markdown("<h1 style='color: blue;'>Placement Analysis</h1>", unsafe_allow_html=True)
29
 
30
  # Define the ANN model architecture
31
  class ANN_Model(nn.Module):
 
4
  import torch.nn.functional as F
5
  import base64
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ st.markdown(
9
+ """
10
+ <style>
11
+ /* Set background image for the entire app */
12
+ .stApp {
13
+ background: url('https://www.umu.ac.in/wp-content/uploads/2020/04/unnamed.png') no-repeat center center fixed;
14
+ background-size: cover;
15
+ }
16
+
17
+ /* Style for the title */
18
+ .stApp h1 {
19
+ background-color: rgba(0, 0, 128, 0.7);
20
+ color: #ffffff; /* White */
21
+ padding: 10px;
22
+ border-radius: 5px;
23
+ font-size: 2.5em;
24
+ text-align: center;
25
+ }
26
+ /* Style for input text area */
27
+ .stTextArea textarea {
28
+ background-color: rgba(255, 255, 255, 0.8);
29
+ color: #000000; /* Black */
30
+ font-size: 1.2em;
31
+ }
32
+ /* Style for the button */
33
+ .stButton>button {
34
+ background-color: #4CAF50; /* Green */
35
+ color: white;
36
+ font-size: 1.2em;
37
+ border-radius: 10px;
38
+ padding: 10px 24px;
39
+ border: none;
40
+ }
41
+ /* Center the button */
42
+ .stButton {
43
+ display: flex;
44
+ justify-content: center;
45
+ }
46
+ /* Style for the output container */
47
+ .output-container {
48
+ background-color: lightpink;
49
+ color: black;
50
+ font-size: 1.5em;
51
+ padding: 15px;
52
+ border-radius: 10px;
53
+ margin-top: 20px;
54
+ box-shadow: 0 4px 8px rgba(0,0,0,0.1);
55
+ width: 200%;
56
+ margin-left: auto;
57
+ margin-right: auto;
58
+ text-align: center;
59
+ }
60
+
61
+ </style>
62
+ """,
63
+ unsafe_allow_html=True
64
+ )
65
 
66
+
67
+ st.title("Placement Analysis")
68
 
69
  # Define the ANN model architecture
70
  class ANN_Model(nn.Module):