Ozgur Unlu
commited on
Commit
·
987780d
1
Parent(s):
5b4acc0
sample text buttons
Browse files
app.py
CHANGED
@@ -306,6 +306,14 @@ def create_interface():
|
|
306 |
gr.Markdown("# Marketing Content Validator")
|
307 |
gr.Markdown("Paste your marketing content below to check for potential issues.")
|
308 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
with gr.Row():
|
310 |
with gr.Column():
|
311 |
input_text = gr.TextArea(
|
@@ -323,6 +331,16 @@ def create_interface():
|
|
323 |
)
|
324 |
report_output = gr.File(label="Download Report")
|
325 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
analyze_btn.click(
|
327 |
fn=lambda text: (
|
328 |
format_results(analyze_content(text)[0]),
|
|
|
306 |
gr.Markdown("# Marketing Content Validator")
|
307 |
gr.Markdown("Paste your marketing content below to check for potential issues.")
|
308 |
|
309 |
+
valid_sample = "Introducing our vibrant collection of iPhone cases designed for young adults who love to stand out! These cases come in a variety of eye-catching colors and patterns that add a splash of personality to your device. Made from durable, sustainable materials, they offer robust protection against everyday bumps and scratches while being kind to the planet. Best of all, they're priced competitively, so you don't have to break the bank to accessorize your phone. Elevate your style and safeguard your phone with our eco-friendly, affordable iPhone cases today!"
|
310 |
+
|
311 |
+
problematic_sample = "Introducing our new daily face mask, perfect for those seeking a quick skincare boost! In just 10 minutes, this crazy mask rejuvenates your skin, leaving it looking healthier and more radiant. Formulated with natural, nourishing ingredients, it's gentle enough for everyday use and suitable for all skin types. Say goodbye to dullness and hello to a refreshed complexion. Plus, our mask is eco-friendly and cruelty-free, aligning with a conscious lifestyle. Elevate your daily routine with this simple step toward glowing skin. Try our face mask today and unveil a more confident you!"
|
312 |
+
|
313 |
+
with gr.Row():
|
314 |
+
valid_btn = gr.Button("Prefill with valid marketing text sample")
|
315 |
+
problem_btn = gr.Button("Prefill with a problematic marketing text sample")
|
316 |
+
|
317 |
with gr.Row():
|
318 |
with gr.Column():
|
319 |
input_text = gr.TextArea(
|
|
|
331 |
)
|
332 |
report_output = gr.File(label="Download Report")
|
333 |
|
334 |
+
valid_btn.click(
|
335 |
+
fn=lambda: valid_sample,
|
336 |
+
outputs=input_text
|
337 |
+
)
|
338 |
+
|
339 |
+
problem_btn.click(
|
340 |
+
fn=lambda: problematic_sample,
|
341 |
+
outputs=input_text
|
342 |
+
)
|
343 |
+
|
344 |
analyze_btn.click(
|
345 |
fn=lambda text: (
|
346 |
format_results(analyze_content(text)[0]),
|