Arghya Ghosh commited on
Commit
9a16da9
·
verified ·
1 Parent(s): 265aedc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -7
app.py CHANGED
@@ -5,7 +5,6 @@ import PyPDF2
5
  import re
6
  from huggingface_hub import hf_hub_download
7
  from io import BytesIO
8
- import base64
9
 
10
  # Set page configuration
11
  st.set_page_config(
@@ -15,12 +14,26 @@ st.set_page_config(
15
  initial_sidebar_state="expanded"
16
  )
17
 
18
- # Custom CSS for better styling
19
- def local_css(file_name):
20
- with open(file_name) as f:
21
- st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
22
-
23
- local_css("style.css") # You can create a style.css file for custom styles
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  # Cache model loading with improved error handling
26
  @st.cache_resource(show_spinner="Loading AI models...")
 
5
  import re
6
  from huggingface_hub import hf_hub_download
7
  from io import BytesIO
 
8
 
9
  # Set page configuration
10
  st.set_page_config(
 
14
  initial_sidebar_state="expanded"
15
  )
16
 
17
+ # Add some basic CSS styling directly in the app
18
+ st.markdown("""
19
+ <style>
20
+ .result-card {
21
+ padding: 20px;
22
+ border-radius: 10px;
23
+ background-color: #f0f2f6;
24
+ margin-bottom: 20px;
25
+ }
26
+ .category {
27
+ font-size: 24px;
28
+ font-weight: bold;
29
+ color: #2e86c1;
30
+ }
31
+ .stSpinner > div {
32
+ text-align: center;
33
+ align-items: center;
34
+ }
35
+ </style>
36
+ """, unsafe_allow_html=True)
37
 
38
  # Cache model loading with improved error handling
39
  @st.cache_resource(show_spinner="Loading AI models...")