Spaces:
Sleeping
Sleeping
Update ui/contentagentui.py
Browse files- ui/contentagentui.py +3 -4
ui/contentagentui.py
CHANGED
|
@@ -102,7 +102,7 @@ class ContentAgentUI:
|
|
| 102 |
# Also check if it's readable and has content
|
| 103 |
with open(css_path, 'r') as f:
|
| 104 |
css_content = f.read()
|
| 105 |
-
|
| 106 |
return css_content
|
| 107 |
|
| 108 |
# ---------- agent call ----------
|
|
@@ -129,7 +129,7 @@ class ContentAgentUI:
|
|
| 129 |
gr.Markdown("# Content Agent")
|
| 130 |
|
| 131 |
# Control panel (shown first; may auto-hide on load)
|
| 132 |
-
with gr.Group(visible=True, elem_id=
|
| 133 |
|
| 134 |
self.status_box = gr.Textbox(
|
| 135 |
label="Status",
|
|
@@ -145,7 +145,7 @@ class ContentAgentUI:
|
|
| 145 |
""")
|
| 146 |
|
| 147 |
# Main panel (hidden until agent is initialized)
|
| 148 |
-
with gr.Group(visible=False, elem_id=
|
| 149 |
# English only
|
| 150 |
strInput = "Content Input"
|
| 151 |
strPlaceholder="Copy and paste your content for evaluation here..."
|
|
@@ -156,7 +156,6 @@ class ContentAgentUI:
|
|
| 156 |
# Guidance / about
|
| 157 |
self._create_user_guidance()
|
| 158 |
|
| 159 |
-
gr.Markdown(f"<style>{css_content}</style>")
|
| 160 |
|
| 161 |
# Chat controls
|
| 162 |
self.agent_state = gr.State(None)
|
|
|
|
| 102 |
# Also check if it's readable and has content
|
| 103 |
with open(css_path, 'r') as f:
|
| 104 |
css_content = f.read()
|
| 105 |
+
|
| 106 |
return css_content
|
| 107 |
|
| 108 |
# ---------- agent call ----------
|
|
|
|
| 129 |
gr.Markdown("# Content Agent")
|
| 130 |
|
| 131 |
# Control panel (shown first; may auto-hide on load)
|
| 132 |
+
with gr.Group(visible=True, elem_id="control_panel" ) as self.control_panel:
|
| 133 |
|
| 134 |
self.status_box = gr.Textbox(
|
| 135 |
label="Status",
|
|
|
|
| 145 |
""")
|
| 146 |
|
| 147 |
# Main panel (hidden until agent is initialized)
|
| 148 |
+
with gr.Group(visible=False, elem_id="main" ) as self.main_panel:
|
| 149 |
# English only
|
| 150 |
strInput = "Content Input"
|
| 151 |
strPlaceholder="Copy and paste your content for evaluation here..."
|
|
|
|
| 156 |
# Guidance / about
|
| 157 |
self._create_user_guidance()
|
| 158 |
|
|
|
|
| 159 |
|
| 160 |
# Chat controls
|
| 161 |
self.agent_state = gr.State(None)
|