papluca's picture
Initial commit
4384641
raw
history blame
802 Bytes
"""Gradio app to showcase the language detector."""
import gradio as gr
title = "Language detection with XLM-RoBERTa"
description = "Determine the language in which your text is written.\nSupported languages are (20): arabic (ar), bulgarian (bg), german (de), modern greek (el), english (en), spanish (es), french (fr), hindi (hi), italian (it), japanese (ja), dutch (nl), polish (pl), portuguese (pt), russian (ru), swahili (sw), thai (th), turkish (tr), urdu (ur), vietnamese (vi), and chinese (zh)."
examples = [
["Better late than never."],
["Tutto è bene ciò che finisce bene."],
["Donde hay humo, hay fuego."],
]
app = gr.Interface.load(
"huggingface/papluca/xlm-roberta-base-finetuned-language-detection",
description=description,
examples=examples,
)
app.launch()