Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from gradio.mix import Series
|
| 3 |
+
|
| 4 |
+
description = "Reguetton spanish songs toxicity classification"
|
| 5 |
+
title = "ES-EN Translation / Toxicity classification / EN-ES Translation"
|
| 6 |
+
|
| 7 |
+
translator_es = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-es-en")
|
| 8 |
+
story_gen = gr.Interface.load("huggingface/SkolkovoInstitute/roberta_toxicity_classifier")
|
| 9 |
+
translator_en = gr.Interface.load("huggingface/Helsinki-NLP/opus-mt-en-es")
|
| 10 |
+
|
| 11 |
+
examples = [["La aventura comienza en"]]
|
| 12 |
+
|
| 13 |
+
interface = Series(translator_es, story_gen, translator_en, description = description,
|
| 14 |
+
title = title,
|
| 15 |
+
examples=examples,
|
| 16 |
+
inputs = gr.inputs.Textbox(lines = 10)
|
| 17 |
+
)
|
| 18 |
+
|
| 19 |
+
interface.launch()
|