Spaces:
Sleeping
Sleeping
Update ui/contentagentui.py
Browse files- ui/contentagentui.py +6 -7
ui/contentagentui.py
CHANGED
|
@@ -79,13 +79,12 @@ class ContentAgentUI:
|
|
| 79 |
def _create_examples(self):
|
| 80 |
examples = self._get_example()
|
| 81 |
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
gr.Markdown("*No examples found.*")
|
| 89 |
|
| 90 |
|
| 91 |
def _get_css(self):
|
|
|
|
| 79 |
def _create_examples(self):
|
| 80 |
examples = self._get_example()
|
| 81 |
|
| 82 |
+
if examples:
|
| 83 |
+
example_radio = gr.Radio(choices=examples, label="Try one of these examples:")
|
| 84 |
+
# fill the prompt when an example is picked
|
| 85 |
+
example_radio.change(fn=lambda ex: ex, inputs=example_radio, outputs=self.prompt)
|
| 86 |
+
else:
|
| 87 |
+
gr.Markdown("*No examples found.*")
|
|
|
|
| 88 |
|
| 89 |
|
| 90 |
def _get_css(self):
|