Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
def trnslt(text):
|
| 5 |
+
first = gr.Interface.load("Helsinki-NLP/opus-mt-tl-en")
|
| 6 |
+
second = gr.Interface.load("Helsinki-NLP/opus-mt-en-tl")
|
| 7 |
+
iface = gr.Series(textgen, tts)
|
| 8 |
+
return iface
|
| 9 |
+
|
| 10 |
+
iface = gr.Interface(
|
| 11 |
+
fn=trnslt,
|
| 12 |
+
inputs='text',
|
| 13 |
+
outputs='text',
|
| 14 |
+
examples=[["Magandang Umaga"],["Magandang gabi"],["Masarap ang Adobo"],["Kumusta ka na"],["Magandang umaga"]],
|
| 15 |
+
theme="darkpeach",
|
| 16 |
+
css=".footer{display:none !important}",
|
| 17 |
+
)
|
| 18 |
+
|
| 19 |
+
iface.launch()
|