anthonysigid commited on
Commit
c55c912
·
1 Parent(s): 2a16478

update UI

Browse files
Files changed (1) hide show
  1. app.py +113 -23
app.py CHANGED
@@ -34,43 +34,133 @@ st.set_page_config(
34
  # --- CSS Styling ---
35
  st.markdown("""
36
  <style>
 
 
 
 
 
 
 
 
37
  .main-header {
38
- font-size: 2.5rem;
39
- font-weight: bold;
40
- color: #1E88E5;
41
- margin-bottom: 0px;
 
 
 
 
42
  }
 
43
  .sub-header {
44
- font-size: 1.2rem;
45
  color: var(--text-color);
46
- opacity: 0.8;
47
- margin-bottom: 30px;
 
48
  }
 
 
49
  .card {
50
- background-color: var(--secondary-background-color);
 
 
 
51
  color: var(--text-color);
52
  padding: 20px;
53
- border-radius: 10px;
54
- border: 1px solid rgba(128, 128, 128, 0.2);
55
- margin-bottom: 20px;
 
 
 
 
 
 
 
56
  }
 
 
57
  .badge {
58
  display: inline-block;
59
- padding: 5px 10px;
60
- background-color: #1E88E5;
61
- color: white;
62
- border-radius: 15px;
63
- font-size: 0.9rem;
64
- margin-right: 5px;
65
- margin-bottom: 5px;
 
 
 
 
 
 
 
 
 
 
66
  }
 
 
67
  .action-item {
68
- background-color: var(--secondary-background-color);
69
  color: var(--text-color);
70
- border-left: 5px solid #ff9800;
71
- padding: 10px;
 
 
 
72
  margin-bottom: 10px;
73
- border-radius: 0 5px 5px 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
  </style>
76
  """, unsafe_allow_html=True)
@@ -117,7 +207,7 @@ if 'models_loaded' not in st.session_state:
117
  """
118
  st.markdown(css_spinner, unsafe_allow_html=True)
119
 
120
- st.info("💡 **Tahukah Anda?** Sistem saat ini sedang memuat model *Natural Language Processing* (NLP) yang berukuran ratusan Megabyte ke dalam memori RAM komputer Anda. Proses ini memakan waktu beberapa detik dan hanya terjadi pada saat pertama kali aplikasi dijalankan.")
121
 
122
  # Jeda sesaat agar browser sempat me-render elemen UI di atas sebelum thread diblokir oleh AI
123
  time.sleep(0.2)
 
34
  # --- CSS Styling ---
35
  st.markdown("""
36
  <style>
37
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');
38
+
39
+ /* Apply premium typography globally */
40
+ html, body, [class*="css"], .stMarkdown, p, span, div, h1, h2, h3, h4, h5, h6 {
41
+ font-family: 'Inter', sans-serif !important;
42
+ }
43
+
44
+ /* Premium Headers */
45
  .main-header {
46
+ font-family: 'Outfit', sans-serif !important;
47
+ font-size: 2.8rem;
48
+ font-weight: 800;
49
+ background: linear-gradient(135deg, #1E88E5 0%, #1565C0 50%, #0D47A1 100%);
50
+ -webkit-background-clip: text;
51
+ -webkit-text-fill-color: transparent;
52
+ margin-bottom: 4px;
53
+ letter-spacing: -0.5px;
54
  }
55
+
56
  .sub-header {
57
+ font-size: 1.1rem;
58
  color: var(--text-color);
59
+ opacity: 0.75;
60
+ margin-bottom: 24px;
61
+ line-height: 1.4;
62
  }
63
+
64
+ /* Glassmorphism Cards with Smooth Transitions */
65
  .card {
66
+ background: rgba(255, 255, 255, 0.03);
67
+ backdrop-filter: blur(10px);
68
+ -webkit-backdrop-filter: blur(10px);
69
+ border: 1px solid rgba(128, 128, 128, 0.15);
70
  color: var(--text-color);
71
  padding: 20px;
72
+ border-radius: 14px;
73
+ margin-bottom: 18px;
74
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
75
+ transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
76
+ }
77
+
78
+ .card:hover {
79
+ transform: translateY(-2px);
80
+ box-shadow: 0 8px 30px rgba(30, 136, 229, 0.1);
81
+ border-color: rgba(30, 136, 229, 0.3);
82
  }
83
+
84
+ /* Pill Badges with Hover Effect */
85
  .badge {
86
  display: inline-block;
87
+ padding: 6px 14px;
88
+ background: linear-gradient(135deg, rgba(30, 136, 229, 0.08) 0%, rgba(21, 101, 192, 0.12) 100%);
89
+ color: #1E88E5 !important;
90
+ border: 1px solid rgba(30, 136, 229, 0.25);
91
+ border-radius: 30px;
92
+ font-size: 0.85rem;
93
+ font-weight: 600;
94
+ margin-right: 6px;
95
+ margin-bottom: 8px;
96
+ transition: all 0.2s ease;
97
+ }
98
+
99
+ .badge:hover {
100
+ background: #1E88E5;
101
+ color: white !important;
102
+ transform: scale(1.05);
103
+ box-shadow: 0 4px 10px rgba(30, 136, 229, 0.2);
104
  }
105
+
106
+ /* Action Items Sleek Border & Hover Transform */
107
  .action-item {
108
+ background: rgba(255, 152, 0, 0.03);
109
  color: var(--text-color);
110
+ border-left: 5px solid #FF9800;
111
+ border-top: 1px solid rgba(255, 152, 0, 0.12);
112
+ border-right: 1px solid rgba(255, 152, 0, 0.12);
113
+ border-bottom: 1px solid rgba(255, 152, 0, 0.12);
114
+ padding: 14px 18px;
115
  margin-bottom: 10px;
116
+ border-radius: 0 10px 10px 0;
117
+ transition: all 0.2s ease;
118
+ }
119
+
120
+ .action-item:hover {
121
+ transform: translateX(4px);
122
+ background: rgba(255, 152, 0, 0.06);
123
+ }
124
+
125
+ /* Smooth Scrollbar for Premium Feel */
126
+ ::-webkit-scrollbar {
127
+ width: 8px;
128
+ height: 8px;
129
+ }
130
+ ::-webkit-scrollbar-track {
131
+ background: transparent;
132
+ }
133
+ ::-webkit-scrollbar-thumb {
134
+ background: rgba(128, 128, 128, 0.3);
135
+ border-radius: 10px;
136
+ }
137
+ ::-webkit-scrollbar-thumb:hover {
138
+ background: rgba(128, 128, 128, 0.5);
139
+ }
140
+
141
+ /* Mobile Responsiveness (Responsive Typography & Spacing) */
142
+ @media (max-width: 768px) {
143
+ .main-header {
144
+ font-size: 1.9rem !important;
145
+ line-height: 1.2;
146
+ text-align: center;
147
+ }
148
+ .sub-header {
149
+ font-size: 0.95rem !important;
150
+ text-align: center;
151
+ margin-bottom: 18px !important;
152
+ }
153
+ .card {
154
+ padding: 16px !important;
155
+ margin-bottom: 14px !important;
156
+ }
157
+ .badge {
158
+ font-size: 0.8rem !important;
159
+ padding: 4px 10px !important;
160
+ }
161
+ .action-item {
162
+ padding: 10px 14px !important;
163
+ }
164
  }
165
  </style>
166
  """, unsafe_allow_html=True)
 
207
  """
208
  st.markdown(css_spinner, unsafe_allow_html=True)
209
 
210
+ st.info("💡 **Tahukah Anda?** Sistem saat ini sedang memuat model *Natural Language Processing* (NLP) yang berukuran cukup besar ke dalam memori server/komputer Anda. Proses ini memakan waktu beberapa saat dan hanya terjadi pada saat pertama kali aplikasi dijalankan.")
211
 
212
  # Jeda sesaat agar browser sempat me-render elemen UI di atas sebelum thread diblokir oleh AI
213
  time.sleep(0.2)