Vnmrsharma commited on
Commit
2e2f4e0
·
verified ·
1 Parent(s): 1f39e22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -17
app.py CHANGED
@@ -3,6 +3,7 @@ import urllib.parse
3
  import streamlit as st
4
  import requests
5
 
 
6
  FRONTEND_PASSWORD = os.environ.get("FE_PASS")
7
  HF_TOKEN = os.environ.get("HF_TOKEN")
8
  API_URL = os.environ.get("END_POINT_URL")
@@ -12,35 +13,56 @@ if not all([FRONTEND_PASSWORD, HF_TOKEN, API_URL]):
12
 
13
 
14
  def main():
 
15
  st.set_page_config(
16
  page_title="Automated Reporter",
17
  page_icon="🤖",
18
  layout="centered",
19
  )
20
 
21
- # Force light mode via CSS overrides
22
  st.markdown("""
23
  <style>
24
- :root {
25
- --primary-background-color: #FFFFFF;
26
- --secondary-background-color: #FFFFFF;
27
- --background-color: #FFFFFF;
28
- --text-color: #000000;
 
 
 
 
 
 
 
 
29
  }
30
- html, body, .stApp, .block-container {
31
- background-color: #FFFFFF !important;
32
- color: #000000 !important;
33
- }
34
- /* Input and button adjustments to match light mode */
35
- div.stTextInput>div>div>input,
36
- div.stTextArea>div>div>textarea,
37
  div.stButton>button {
38
- color: #000000 !important;
 
 
 
 
 
 
 
 
39
  }
40
- /* Links color for light mode */
41
- a {
42
- color: #1a0dab !important;
 
 
 
 
 
 
 
 
43
  }
 
44
  </style>
45
  """, unsafe_allow_html=True)
46
 
 
3
  import streamlit as st
4
  import requests
5
 
6
+ # Load configuration from environment variables
7
  FRONTEND_PASSWORD = os.environ.get("FE_PASS")
8
  HF_TOKEN = os.environ.get("HF_TOKEN")
9
  API_URL = os.environ.get("END_POINT_URL")
 
13
 
14
 
15
  def main():
16
+ # Page config
17
  st.set_page_config(
18
  page_title="Automated Reporter",
19
  page_icon="🤖",
20
  layout="centered",
21
  )
22
 
23
+ # Custom CSS for enhanced styling
24
  st.markdown("""
25
  <style>
26
+ /* Page background and container */
27
+ .stApp { background-color: #f7f9fc; }
28
+ .block-container { padding: 2rem 1rem; max-width: 800px; margin: auto; }
29
+
30
+ /* Title styling */
31
+ .stMarkdown h1, .stMarkdown h2, .stMarkdown h3 { color: #333; }
32
+
33
+ /* Input fields styling */
34
+ div.stTextInput>div>div>input, div.stTextArea>div>div>textarea {
35
+ border-radius: 8px !important;
36
+ border: 1px solid #ccc !important;
37
+ padding: 0.6rem !important;
38
+ font-size: 1rem !important;
39
  }
40
+
41
+ /* Button styling */
 
 
 
 
 
42
  div.stButton>button {
43
+ background-color: #4caf50 !important;
44
+ color: white !important;
45
+ padding: 0.75rem 1.5rem !important;
46
+ border-radius: 8px !important;
47
+ font-size: 1rem !important;
48
+ transition: background-color 0.3s ease;
49
+ }
50
+ div.stButton>button:hover {
51
+ background-color: #45a049 !important;
52
  }
53
+
54
+ /* Error and success message styling */
55
+ .stError, .stSuccess { font-weight: bold; }
56
+
57
+ /* WhatsApp share link styling */
58
+ a.whatsapp-share {
59
+ display: inline-block;
60
+ margin-top: 0.5rem;
61
+ color: #25D366;
62
+ font-weight: bold;
63
+ text-decoration: none;
64
  }
65
+ a.whatsapp-share:hover { text-decoration: underline; }
66
  </style>
67
  """, unsafe_allow_html=True)
68