papluca commited on
Commit
4384641
1 Parent(s): 2af88cc

Initial commit

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Gradio app to showcase the language detector."""
2
+
3
+ import gradio as gr
4
+
5
+ title = "Language detection with XLM-RoBERTa"
6
+ 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)."
7
+ examples = [
8
+ ["Better late than never."],
9
+ ["Tutto è bene ciò che finisce bene."],
10
+ ["Donde hay humo, hay fuego."],
11
+ ]
12
+
13
+ app = gr.Interface.load(
14
+ "huggingface/papluca/xlm-roberta-base-finetuned-language-detection",
15
+ description=description,
16
+ examples=examples,
17
+ )
18
+
19
+ app.launch()