yetessam commited on
Commit
379ab6b
·
verified ·
1 Parent(s): ba57fb3

Update ui/contentagentui.py

Browse files
Files changed (1) hide show
  1. ui/contentagentui.py +9 -1
ui/contentagentui.py CHANGED
@@ -4,6 +4,8 @@ import gradio as gr
4
  from checks.status_check import is_endpoint_healthy
5
  from checks.endpoint_utils import wake_endpoint
6
 
 
 
7
 
8
  class ContentAgentUI:
9
  """
@@ -152,10 +154,16 @@ class ContentAgentUI:
152
  self.examples_radio.change(lambda ex: ex, inputs=self.examples_radio, outputs=self.prompt)
153
  else:
154
  gr.Markdown("*No examples found.*")
155
-
156
  # Footer
157
  gr.Markdown("<div id='footer'>Thanks for trying it out!</div>")
158
 
 
 
 
 
 
 
159
  # --- AUTO INIT ON LOAD IF HEALTHY ---
160
  def on_load():
161
  healthy, msg = is_endpoint_healthy(self.endpoint_uri)
 
4
  from checks.status_check import is_endpoint_healthy
5
  from checks.endpoint_utils import wake_endpoint
6
 
7
+ from prompts.prompts import _print_defaults_wrapper
8
+
9
 
10
  class ContentAgentUI:
11
  """
 
154
  self.examples_radio.change(lambda ex: ex, inputs=self.examples_radio, outputs=self.prompt)
155
  else:
156
  gr.Markdown("*No examples found.*")
157
+
158
  # Footer
159
  gr.Markdown("<div id='footer'>Thanks for trying it out!</div>")
160
 
161
+ show_btn = gr.Button("Show default prompt templates", variant="secondary", container=False)
162
+ defaults_out = gr.Code(label="Prompt templates (YAML)", language="yaml", interactive=False, container=False)
163
+
164
+ show_btn.click(fn=_print_defaults_wrapper, outputs=defaults_out)
165
+
166
+
167
  # --- AUTO INIT ON LOAD IF HEALTHY ---
168
  def on_load():
169
  healthy, msg = is_endpoint_healthy(self.endpoint_uri)