Spaces:
Sleeping
Sleeping
Arghya Ghosh commited on
Update app.py
Browse files
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 |
-
#
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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...")
|