Spaces:
Sleeping
Sleeping
File size: 779 Bytes
41316b3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import gradio as gr
def repeat_emoji(emoji, count):
try:
count = int(count)
if int(count) < 1:
return "Please enter a number greater than 0."
return emoji * int(count)
except:
return "Please enter a valid number."
app = gr.Interface(
fn=repeat_emoji,
inputs=[
gr.Textbox(label="Emoji", placeholder="e.g., π"),
gr.Number(label="How many times?", value=10, precision=0)
],
outputs=gr.Textbox(label="Copy Duplicated Emoji", lines=4),
title="π Emoji Duplicator",
description="Enter any emoji and choose how many times to duplicate it!",
examples=[
["π", 5],
["π", 12],
["π", 20],
["πΆ", 8],
["π", 15],
],
)
app.launch()
|