| import gradio as gr | |
| # Demo function that echoes text and adds some emojis | |
| def chat_fn(user_input): | |
| return f"{user_input} π¦π¬βπβοΈ" | |
| # Custom CSS to force emoji font | |
| css = """ | |
| body, .output_text, .input_textarea { | |
| font-family: 'Noto Color Emoji', 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif; | |
| } | |
| """ | |
| # Gradio interface | |
| iface = gr.Interface( | |
| fn=chat_fn, | |
| inputs="text", | |
| outputs="text", | |
| css=css | |
| ) | |
| iface.launch() | |