Commit
路
1ae55fd
1
Parent(s):
7acb40d
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,14 @@ import gradio as gr
|
|
| 2 |
from transformers import AutoModelForSeq2SeqLM
|
| 3 |
from transformers import AutoTokenizer
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
model = AutoModelForSeq2SeqLM.from_pretrained('hackathon-pln-es/t5-small-spanish-nahuatl')
|
| 6 |
tokenizer = AutoTokenizer.from_pretrained('hackathon-pln-es/t5-small-spanish-nahuatl')
|
| 7 |
|
|
@@ -30,6 +38,7 @@ gr.Interface(
|
|
| 30 |
'esto se llama agua',
|
| 31 |
'mi abuelo se llama Juan',
|
| 32 |
'te amo con todo mi coraz贸n'],
|
|
|
|
| 33 |
allow_flagging="manual",
|
| 34 |
flagging_options=["right translation", "wrong translation", "error", "other"],
|
| 35 |
flagging_dir="logs"
|
|
|
|
| 2 |
from transformers import AutoModelForSeq2SeqLM
|
| 3 |
from transformers import AutoTokenizer
|
| 4 |
|
| 5 |
+
article='''
|
| 6 |
+
## Team members
|
| 7 |
+
47 - Emilio Morales [(milmor)](https://huggingface.co/milmor)
|
| 8 |
+
48 - Rodrigo Mart铆nez Arzate [(rockdrigoma)](https://huggingface.co/rockdrigoma)
|
| 9 |
+
49 - Luis Armando Mercado [(luisarmando)](https://huggingface.co/luisarmando)
|
| 10 |
+
50 - Jacobo del Valle [(jjdv)](https://huggingface.co/jjdv)
|
| 11 |
+
'''
|
| 12 |
+
|
| 13 |
model = AutoModelForSeq2SeqLM.from_pretrained('hackathon-pln-es/t5-small-spanish-nahuatl')
|
| 14 |
tokenizer = AutoTokenizer.from_pretrained('hackathon-pln-es/t5-small-spanish-nahuatl')
|
| 15 |
|
|
|
|
| 38 |
'esto se llama agua',
|
| 39 |
'mi abuelo se llama Juan',
|
| 40 |
'te amo con todo mi coraz贸n'],
|
| 41 |
+
article=article,
|
| 42 |
allow_flagging="manual",
|
| 43 |
flagging_options=["right translation", "wrong translation", "error", "other"],
|
| 44 |
flagging_dir="logs"
|