Spaces:
Build error
Build error
Vlad Bastina
commited on
Commit
·
a20ded2
1
Parent(s):
1d55012
style css
Browse files- app_generated.py +16 -2
- style.css +0 -0
app_generated.py
CHANGED
|
@@ -18,7 +18,7 @@ import html
|
|
| 18 |
import re
|
| 19 |
from openai import OpenAI
|
| 20 |
from io import StringIO
|
| 21 |
-
|
| 22 |
load_dotenv()
|
| 23 |
|
| 24 |
# --- Configuration ---
|
|
@@ -326,7 +326,21 @@ def get_zega_logo_base64():
|
|
| 326 |
return encoded_string
|
| 327 |
except Exception as e:
|
| 328 |
raise
|
| 329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
# Streamlit Interface
|
| 331 |
st.title("Data Analysis Agent Interface")
|
| 332 |
|
|
|
|
| 18 |
import re
|
| 19 |
from openai import OpenAI
|
| 20 |
from io import StringIO
|
| 21 |
+
from pathlib import Path
|
| 22 |
load_dotenv()
|
| 23 |
|
| 24 |
# --- Configuration ---
|
|
|
|
| 326 |
return encoded_string
|
| 327 |
except Exception as e:
|
| 328 |
raise
|
| 329 |
+
|
| 330 |
+
def load_css(file_name):
|
| 331 |
+
"""Loads a CSS file and injects it into the Streamlit app."""
|
| 332 |
+
try:
|
| 333 |
+
css_path = Path(__file__).parent / file_name
|
| 334 |
+
with open(css_path) as f:
|
| 335 |
+
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
|
| 336 |
+
# st.info(f"Loaded CSS: {file_name}") # Optional: uncomment for debugging
|
| 337 |
+
except FileNotFoundError:
|
| 338 |
+
st.error(f"CSS file not found: {file_name}. Make sure it's in the same directory as app.py.")
|
| 339 |
+
except Exception as e:
|
| 340 |
+
st.error(f"Error loading CSS file {file_name}: {e}")
|
| 341 |
+
|
| 342 |
+
load_css("style.css")
|
| 343 |
+
|
| 344 |
# Streamlit Interface
|
| 345 |
st.title("Data Analysis Agent Interface")
|
| 346 |
|
style.css
ADDED
|
File without changes
|