NeuralFalcon commited on
Commit
41316b3
Β·
verified Β·
1 Parent(s): 0cfbc01

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -0
app.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def repeat_emoji(emoji, count):
4
+ try:
5
+ count = int(count)
6
+ if int(count) < 1:
7
+ return "Please enter a number greater than 0."
8
+ return emoji * int(count)
9
+ except:
10
+ return "Please enter a valid number."
11
+
12
+ app = gr.Interface(
13
+ fn=repeat_emoji,
14
+ inputs=[
15
+ gr.Textbox(label="Emoji", placeholder="e.g., πŸ’€"),
16
+ gr.Number(label="How many times?", value=10, precision=0)
17
+ ],
18
+ outputs=gr.Textbox(label="Copy Duplicated Emoji", lines=4),
19
+ title="πŸŒ€ Emoji Duplicator",
20
+ description="Enter any emoji and choose how many times to duplicate it!",
21
+ examples=[
22
+ ["πŸ’€", 5],
23
+ ["πŸ˜‚", 12],
24
+ ["🌈", 20],
25
+ ["🐢", 8],
26
+ ["πŸ’–", 15],
27
+ ],
28
+ )
29
+
30
+ app.launch()