Spaces:
Sleeping
Sleeping
Update ui/contentagentui.py
Browse files- ui/contentagentui.py +3 -3
ui/contentagentui.py
CHANGED
|
@@ -66,7 +66,7 @@ class ContentAgentUI:
|
|
| 66 |
def _call_agent(text: str, agent) -> str:
|
| 67 |
try:
|
| 68 |
if agent is None:
|
| 69 |
-
return "
|
| 70 |
return str(agent.run(text)) # smolagents.CodeAgent API
|
| 71 |
except Exception as e:
|
| 72 |
return f"Error: {e}"
|
|
@@ -92,7 +92,7 @@ class ContentAgentUI:
|
|
| 92 |
lines=8,
|
| 93 |
interactive=False,
|
| 94 |
)
|
| 95 |
-
start_btn = gr.Button("Start Agent (
|
| 96 |
|
| 97 |
# Main panel (hidden until agent is initialized)
|
| 98 |
with gr.Group(visible=False) as self.main_panel:
|
|
@@ -108,7 +108,7 @@ class ContentAgentUI:
|
|
| 108 |
|
| 109 |
# Chat controls
|
| 110 |
self.agent_state = gr.State(None)
|
| 111 |
-
self.prompt = gr.Textbox(label="
|
| 112 |
self.reply = gr.Textbox(label="Content feedback", interactive=False, lines=12)
|
| 113 |
submit_btn = gr.Button("Submit")
|
| 114 |
|
|
|
|
| 66 |
def _call_agent(text: str, agent) -> str:
|
| 67 |
try:
|
| 68 |
if agent is None:
|
| 69 |
+
return "The LLM is not initialized and will need to be started. Click 'Start Agent'."
|
| 70 |
return str(agent.run(text)) # smolagents.CodeAgent API
|
| 71 |
except Exception as e:
|
| 72 |
return f"Error: {e}"
|
|
|
|
| 92 |
lines=8,
|
| 93 |
interactive=False,
|
| 94 |
)
|
| 95 |
+
start_btn = gr.Button("Start Agent (it can take up to 5 minute to start up)")
|
| 96 |
|
| 97 |
# Main panel (hidden until agent is initialized)
|
| 98 |
with gr.Group(visible=False) as self.main_panel:
|
|
|
|
| 108 |
|
| 109 |
# Chat controls
|
| 110 |
self.agent_state = gr.State(None)
|
| 111 |
+
self.prompt = gr.Textbox(label="Content Input", placeholder="Enter your content for evaluation here.")
|
| 112 |
self.reply = gr.Textbox(label="Content feedback", interactive=False, lines=12)
|
| 113 |
submit_btn = gr.Button("Submit")
|
| 114 |
|