Utkarsh524 commited on
Commit
a8022ab
·
verified ·
1 Parent(s): 49ce4c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -17
app.py CHANGED
@@ -18,36 +18,35 @@ st.set_page_config(
18
  )
19
 
20
  # -------------------------------
21
- # CUSTOM CSS FOR STYLING
22
  # -------------------------------
23
- def local_css(file_name):
24
- with open(file_name) as f:
25
- st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
26
-
27
- # You would create a style.css file for this, but for a single script, we can inject it directly.
28
  st.markdown("""
29
  <style>
 
 
 
30
  /* Main App Font and Background */
31
  html, body, [class*="st-"] {
32
  font-family: 'Inter', sans-serif;
33
  }
34
  .stApp {
35
- background-color: #F0F2F6;
 
36
  }
37
  /* Main Title */
38
  h1 {
39
  font-size: 3rem;
40
  font-weight: 700;
41
- color: #1E293B;
42
  text-align: center;
43
  padding-top: 1rem;
44
  }
45
  /* Subheader Styling */
46
  h2 {
47
- color: #334155;
48
  font-weight: 600;
49
  }
50
- /* Custom Containers */
51
  .stTabs [data-baseweb="tab-list"] {
52
  gap: 24px;
53
  }
@@ -56,12 +55,14 @@ st.markdown("""
56
  white-space: pre-wrap;
57
  background-color: transparent;
58
  border-radius: 4px 4px 0px 0px;
 
59
  gap: 1px;
60
  padding-top: 10px;
61
  padding-bottom: 10px;
62
  }
63
  .stTabs [aria-selected="true"] {
64
- background-color: #FFFFFF;
 
65
  }
66
  /* Styled Buttons */
67
  .stButton>button {
@@ -79,17 +80,18 @@ st.markdown("""
79
  }
80
  /* Result Card Styling */
81
  .result-card {
82
- background-color: white;
83
  border-radius: 12px;
84
  padding: 20px;
85
  margin-bottom: 10px;
86
- box-shadow: 0 4px 6px rgba(0,0,0,0.05);
87
- border: 1px solid #E2E8F0;
88
  text-align: center;
 
89
  }
90
  .result-card h3 {
91
  font-size: 1.25rem;
92
- color: #1E293B;
93
  margin-bottom: 15px;
94
  }
95
  .result-verdict {
@@ -98,15 +100,19 @@ st.markdown("""
98
  margin-bottom: 15px;
99
  }
100
  .result-verdict.fake {
101
- color: #DC2626; /* Red */
102
  }
103
  .result-verdict.real {
104
- color: #16A34A; /* Green */
105
  }
106
  /* Custom Progress Bar for Confidence */
107
  .stProgress > div > div > div > div {
108
  background-image: linear-gradient(to right, #6366F1 , #4F46E5);
109
  }
 
 
 
 
110
  </style>
111
  """, unsafe_allow_html=True)
112
 
@@ -350,6 +356,7 @@ with tab2:
350
 
351
 
352
 
 
353
  # import streamlit as st
354
  # import joblib
355
  # from pathlib import Path
 
18
  )
19
 
20
  # -------------------------------
21
+ # CUSTOM CSS FOR STYLING (DARK MODE)
22
  # -------------------------------
 
 
 
 
 
23
  st.markdown("""
24
  <style>
25
+ /* Google Font */
26
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
27
+
28
  /* Main App Font and Background */
29
  html, body, [class*="st-"] {
30
  font-family: 'Inter', sans-serif;
31
  }
32
  .stApp {
33
+ background-color: #0E1117; /* Streamlit Dark Background */
34
+ color: #FAFAFA;
35
  }
36
  /* Main Title */
37
  h1 {
38
  font-size: 3rem;
39
  font-weight: 700;
40
+ color: #FFFFFF;
41
  text-align: center;
42
  padding-top: 1rem;
43
  }
44
  /* Subheader Styling */
45
  h2 {
46
+ color: #E2E8F0;
47
  font-weight: 600;
48
  }
49
+ /* Custom Containers & Tabs */
50
  .stTabs [data-baseweb="tab-list"] {
51
  gap: 24px;
52
  }
 
55
  white-space: pre-wrap;
56
  background-color: transparent;
57
  border-radius: 4px 4px 0px 0px;
58
+ color: #A0AEC0;
59
  gap: 1px;
60
  padding-top: 10px;
61
  padding-bottom: 10px;
62
  }
63
  .stTabs [aria-selected="true"] {
64
+ background-color: #1E293B;
65
+ color: #FFFFFF;
66
  }
67
  /* Styled Buttons */
68
  .stButton>button {
 
80
  }
81
  /* Result Card Styling */
82
  .result-card {
83
+ background-color: #1E293B;
84
  border-radius: 12px;
85
  padding: 20px;
86
  margin-bottom: 10px;
87
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1);
88
+ border: 1px solid #334155;
89
  text-align: center;
90
+ height: 100%;
91
  }
92
  .result-card h3 {
93
  font-size: 1.25rem;
94
+ color: #E2E8F0;
95
  margin-bottom: 15px;
96
  }
97
  .result-verdict {
 
100
  margin-bottom: 15px;
101
  }
102
  .result-verdict.fake {
103
+ color: #F87171; /* Lighter Red for dark mode */
104
  }
105
  .result-verdict.real {
106
+ color: #4ADE80; /* Lighter Green for dark mode */
107
  }
108
  /* Custom Progress Bar for Confidence */
109
  .stProgress > div > div > div > div {
110
  background-image: linear-gradient(to right, #6366F1 , #4F46E5);
111
  }
112
+ /* Sidebar styling */
113
+ [data-testid="stSidebar"] {
114
+ background-color: #1E293B;
115
+ }
116
  </style>
117
  """, unsafe_allow_html=True)
118
 
 
356
 
357
 
358
 
359
+
360
  # import streamlit as st
361
  # import joblib
362
  # from pathlib import Path