Spaces:
Sleeping
Sleeping
Update ui/contentagentui.py
Browse files- ui/contentagentui.py +6 -5
ui/contentagentui.py
CHANGED
|
@@ -113,17 +113,18 @@ class ContentAgentUI:
|
|
| 113 |
if self.app is not None:
|
| 114 |
return self.app
|
| 115 |
|
| 116 |
-
|
| 117 |
-
|
| 118 |
# Optional: Adjust path if needed for hosted environments
|
| 119 |
css_path = os.path.join(os.getcwd(), "ui", "styles.css")
|
| 120 |
print("adding css, does it exist?")
|
| 121 |
if ( os.path.exists(css_path)):
|
| 122 |
-
|
|
|
|
|
|
|
|
|
|
| 123 |
else:
|
| 124 |
-
|
| 125 |
|
| 126 |
-
with gr.Blocks(css=css_path
|
| 127 |
# global header (always visible)
|
| 128 |
gr.Markdown("# Content Agent")
|
| 129 |
|
|
|
|
| 113 |
if self.app is not None:
|
| 114 |
return self.app
|
| 115 |
|
|
|
|
|
|
|
| 116 |
# Optional: Adjust path if needed for hosted environments
|
| 117 |
css_path = os.path.join(os.getcwd(), "ui", "styles.css")
|
| 118 |
print("adding css, does it exist?")
|
| 119 |
if ( os.path.exists(css_path)):
|
| 120 |
+
# Also check if it's readable and has content
|
| 121 |
+
with open(css_path, 'r') as f:
|
| 122 |
+
content = f.read()
|
| 123 |
+
print(f"CSS file size: {len(content)} characters")
|
| 124 |
else:
|
| 125 |
+
css_path = ""
|
| 126 |
|
| 127 |
+
with gr.Blocks(css=css_path) as demo:
|
| 128 |
# global header (always visible)
|
| 129 |
gr.Markdown("# Content Agent")
|
| 130 |
|