Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
translator = pipeline("translation_en_to_de")
|
5 |
+
def get_translate(input_text):
|
6 |
+
return translator(input_text)
|
7 |
+
iface=gr.Interface(fn=get_translate,inputs="text",outputs=['text'],title='Sakil EnglishToGerman Translator APP')
|
8 |
+
|
9 |
+
iface.launch(inline=False)
|