KhaqanNasir commited on
Commit
3e9756c
·
verified ·
1 Parent(s): d3e9ab2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -39
app.py CHANGED
@@ -12,22 +12,29 @@ st.set_page_config(
12
  initial_sidebar_state="expanded"
13
  )
14
 
15
- # Custom CSS for modern styling
16
  st.markdown("""
17
  <style>
18
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
19
-
20
- body {
21
- font-family: 'Poppins', sans-serif;
22
- background-color: #FFFFFF;
23
- color: #333333;
 
 
 
 
 
 
 
24
  }
25
-
26
  .sidebar .sidebar-content {
27
  background-color: #F4F7FA;
28
  padding: 1rem;
29
  }
30
-
31
  .stButton>button {
32
  background-color: #4B5EAA;
33
  color: white;
@@ -36,46 +43,22 @@ st.markdown("""
36
  font-weight: 600;
37
  transition: background-color 0.3s;
38
  }
39
-
40
  .stButton>button:hover {
41
  background-color: #3A4A8C;
42
  }
43
-
44
  .stTextArea textarea {
45
  border: 1px solid #E0E0E0;
46
  border-radius: 8px;
47
  padding: 1rem;
48
  }
49
-
50
- .hero-section {
51
- background-color: #F4F7FA;
52
- padding: 2rem;
53
- border-radius: 12px;
54
- margin-bottom: 2rem;
55
- }
56
-
57
- .flash-message {
58
- padding: 1rem;
59
- border-radius: 8px;
60
- margin-bottom: 1rem;
61
- font-weight: 600;
62
- }
63
-
64
- .success-message {
65
- background-color: #E6F4EA;
66
- color: #2E7D32;
67
- }
68
-
69
- .error-message {
70
- background-color: #FEE2E2;
71
- color: #B71C1C;
72
- }
73
-
74
  /* Enhanced sidebar styling */
75
  .stRadio > div {
76
  gap: 0.5rem;
77
  }
78
-
79
  .stRadio > div > label {
80
  padding: 0.5rem 1rem;
81
  border-radius: 8px;
@@ -83,12 +66,12 @@ st.markdown("""
83
  cursor: pointer;
84
  font-weight: 500;
85
  }
86
-
87
  .stRadio > div > label:hover {
88
  background-color: #E8F0FE;
89
  transform: translateX(5px);
90
  }
91
-
92
  .stRadio > div > label[data-checked="true"] {
93
  background-color: #4B5EAA;
94
  color: white;
@@ -111,7 +94,7 @@ def download_model():
111
  st.markdown('<div class="flash-message success-message">Model downloaded successfully!</div>', unsafe_allow_html=True)
112
  except Exception as e:
113
  st.markdown(f'<div class="flash-message error-message">Failed to download model: {str(e)}</div>', unsafe_allow_html=True)
114
- st.markdown('<div class="flash-message error-message">Please check your Google Drive link and make sure the file is publicly accessible.</div>', unsafe_allow_html=True)
115
  return False
116
  return True
117
 
 
12
  initial_sidebar_state="expanded"
13
  )
14
 
15
+ # Custom CSS with Poppins font
16
  st.markdown("""
17
  <style>
18
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
19
+
20
+ * {
21
+ font-family: 'Poppins', sans-serif !important;
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ .stApp {
26
+ background: #ffffff;
27
+ min-height: 100vh;
28
+ color: #1f2a44;
29
+ margin: 0 !important;
30
+ padding: 0 !important;
31
  }
32
+
33
  .sidebar .sidebar-content {
34
  background-color: #F4F7FA;
35
  padding: 1rem;
36
  }
37
+
38
  .stButton>button {
39
  background-color: #4B5EAA;
40
  color: white;
 
43
  font-weight: 600;
44
  transition: background-color 0.3s;
45
  }
46
+
47
  .stButton>button:hover {
48
  background-color: #3A4A8C;
49
  }
50
+
51
  .stTextArea textarea {
52
  border: 1px solid #E0E0E0;
53
  border-radius: 8px;
54
  padding: 1rem;
55
  }
56
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  /* Enhanced sidebar styling */
58
  .stRadio > div {
59
  gap: 0.5rem;
60
  }
61
+
62
  .stRadio > div > label {
63
  padding: 0.5rem 1rem;
64
  border-radius: 8px;
 
66
  cursor: pointer;
67
  font-weight: 500;
68
  }
69
+
70
  .stRadio > div > label:hover {
71
  background-color: #E8F0FE;
72
  transform: translateX(5px);
73
  }
74
+
75
  .stRadio > div > label[data-checked="true"] {
76
  background-color: #4B5EAA;
77
  color: white;
 
94
  st.markdown('<div class="flash-message success-message">Model downloaded successfully!</div>', unsafe_allow_html=True)
95
  except Exception as e:
96
  st.markdown(f'<div class="flash-message error-message">Failed to download model: {str(e)}</div>', unsafe_allow_html=True)
97
+ st.markdown('<div class="flash-message error-message">Please check your Google Drive link and ensure the file is publicly accessible.</div>', unsafe_allow_html=True)
98
  return False
99
  return True
100