yetessam commited on
Commit
9279922
·
verified ·
1 Parent(s): 06e6322

Update ui/contentagentui.py

Browse files
Files changed (1) hide show
  1. ui/contentagentui.py +5 -4
ui/contentagentui.py CHANGED
@@ -108,7 +108,7 @@ class ContentAgentUI:
108
  def _call_agent(text: str, agent) -> str:
109
  try:
110
  if agent is None:
111
- return "Content Agent's LLM is sleeping and will need to be started. Click 'Start Agent'."
112
  return str(agent.run(text)) # smolagents.CodeAgent API
113
  except Exception as e:
114
  return f"Error: {e}"
@@ -146,7 +146,8 @@ class ContentAgentUI:
146
  strInput = "Content Input"
147
  strPlaceholder="Copy and paste your content for evaluation here..."
148
  strSubmit = "Submit"
149
- strOutput = "Content feedback"
 
150
 
151
 
152
  # Guidance / about
@@ -158,7 +159,7 @@ class ContentAgentUI:
158
  with gr.Row(equal_height=True):
159
 
160
  submit_btn = gr.Button(strSubmit)
161
- self.clear = gr.Button("Clear")
162
 
163
 
164
  self.reply = gr.Textbox(label=strOutput, interactive=False, lines=12, max_lines=20)
@@ -185,7 +186,7 @@ class ContentAgentUI:
185
  try:
186
  agent = self.agent_initializer(self.endpoint_uri)
187
  return (
188
- f"Endpoint healthy ✅ — {msg}. Agent initialized.",
189
  gr.update(visible=False), # hide control panel
190
  gr.update(visible=True), # show main panel
191
  agent,
 
108
  def _call_agent(text: str, agent) -> str:
109
  try:
110
  if agent is None:
111
+ return "Content Agent's end-point is sleeping and will need to be started. Click 'Start Agent' and wait a few minutes."
112
  return str(agent.run(text)) # smolagents.CodeAgent API
113
  except Exception as e:
114
  return f"Error: {e}"
 
146
  strInput = "Content Input"
147
  strPlaceholder="Copy and paste your content for evaluation here..."
148
  strSubmit = "Submit"
149
+ strOutput = "Label and Score"
150
+ strClear= "Clear"
151
 
152
 
153
  # Guidance / about
 
159
  with gr.Row(equal_height=True):
160
 
161
  submit_btn = gr.Button(strSubmit)
162
+ self.clear = gr.Button(strClear)
163
 
164
 
165
  self.reply = gr.Textbox(label=strOutput, interactive=False, lines=12, max_lines=20)
 
186
  try:
187
  agent = self.agent_initializer(self.endpoint_uri)
188
  return (
189
+ f"Endpoint healthy {msg}. Agent initialized.",
190
  gr.update(visible=False), # hide control panel
191
  gr.update(visible=True), # show main panel
192
  agent,