Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -104,16 +104,17 @@ with gr.Blocks(title="Cohere Arabic Model Demo") as demo:
|
|
| 104 |
|
| 105 |
# Examples
|
| 106 |
gr.Markdown("### Example prompts")
|
| 107 |
-
examples = gr.Examples(
|
| 108 |
-
examples=example_prompts,
|
| 109 |
-
inputs="prompt"
|
| 110 |
-
)
|
| 111 |
|
| 112 |
# Input and output
|
| 113 |
with gr.Row():
|
| 114 |
with gr.Column():
|
| 115 |
prompt = gr.Textbox(label="Prompt", placeholder="Enter your prompt here...")
|
| 116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
with gr.Row():
|
| 118 |
submit_btn = gr.Button("Generate", variant="primary")
|
| 119 |
clear_btn = gr.Button("Clear")
|
|
|
|
| 104 |
|
| 105 |
# Examples
|
| 106 |
gr.Markdown("### Example prompts")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
# Input and output
|
| 109 |
with gr.Row():
|
| 110 |
with gr.Column():
|
| 111 |
prompt = gr.Textbox(label="Prompt", placeholder="Enter your prompt here...")
|
| 112 |
|
| 113 |
+
# Add examples buttons
|
| 114 |
+
with gr.Row():
|
| 115 |
+
for example in example_prompts:
|
| 116 |
+
gr.Button(example).click(lambda ex=example: ex, outputs=prompt)
|
| 117 |
+
|
| 118 |
with gr.Row():
|
| 119 |
submit_btn = gr.Button("Generate", variant="primary")
|
| 120 |
clear_btn = gr.Button("Clear")
|