Spaces:
Running
Running
Commit
·
ffbde4f
1
Parent(s):
24a2a89
update title
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def generate_translation(prompt):
|
|
24 |
|
25 |
for response in stream:
|
26 |
output += response.token.text
|
27 |
-
|
28 |
emoji_pattern = r"[^\u0021-\u007E\u00A0-\uD7FF\uE000-\uFDCF\uFF00-\uFFEF\u10000-\u10FFFF\u0300-\u036F\u1F00-\u1F1F\u1F20-\u1F7F\u2600-\u26FF\u2700-\u27BF]+?"
|
29 |
|
30 |
filtered_output = re.findall(emoji_pattern, output)
|
@@ -33,6 +33,10 @@ def generate_translation(prompt):
|
|
33 |
|
34 |
|
35 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
36 |
with gr.Row():
|
37 |
name = gr.Textbox(label="Enter text")
|
38 |
output = gr.Textbox(label="Translation")
|
|
|
24 |
|
25 |
for response in stream:
|
26 |
output += response.token.text
|
27 |
+
|
28 |
emoji_pattern = r"[^\u0021-\u007E\u00A0-\uD7FF\uE000-\uFDCF\uFF00-\uFFEF\u10000-\u10FFFF\u0300-\u036F\u1F00-\u1F1F\u1F20-\u1F7F\u2600-\u26FF\u2700-\u27BF]+?"
|
29 |
|
30 |
filtered_output = re.findall(emoji_pattern, output)
|
|
|
33 |
|
34 |
|
35 |
with gr.Blocks() as demo:
|
36 |
+
gr.HTML("""
|
37 |
+
<center><h1>Emoji Translator😊🤗</h1></center>
|
38 |
+
<h2>Translate any text into emojis!<h2>
|
39 |
+
""")
|
40 |
with gr.Row():
|
41 |
name = gr.Textbox(label="Enter text")
|
42 |
output = gr.Textbox(label="Translation")
|