Spaces:
Runtime error
Runtime error
File size: 794 Bytes
f2ab8af 93abcee 874124d 46785de 874124d 46785de 93abcee f2ab8af b84c2d7 f2ab8af 39ce26c 93abcee f2ab8af |
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
import json
with open("emoji_meanings.json", "r", encoding="utf-8") as json_file:
emoji_meanings = json.load(json_file)
def get_emoji_meaning(emoji):
return emoji_meanings.get(emoji, "Emoticon meaning not found")
examples = [
"๐",
"๐คฉ",
"๐ฅต",
"๐ฅถ",
"๐บ",
"๐ค",
"๐บ",
]
iface = gr.Interface(
fn=get_emoji_meaning,
inputs=gr.Textbox(label="Emoji Input", max_lines=1, interactive=True),
outputs=gr.Textbox(label="Emoji Meaning", max_lines=2, lines=1, show_copy_button=True, interactive=False),
title="Emoji Meaning",
description="โ ๏ธ This is a test version, so not all emojis have meanings here!",
examples=examples,
theme="zenafey/prodia-web",
live=True,
)
iface.launch(show_api=False) |