Spaces:
Sleeping
Sleeping
Delete app.py
Browse files
app.py
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import transformers
|
3 |
-
|
4 |
-
def translate_with_prefix(English):
|
5 |
-
prefix = "Translate English to Latin: "
|
6 |
-
translator = transformers.pipeline("translation", model="AlbertY123/translator-en-la")
|
7 |
-
return translator(prefix + English)
|
8 |
-
|
9 |
-
iface = gr.Interface(fn=translate_with_prefix,
|
10 |
-
inputs="text",
|
11 |
-
outputs="text"
|
12 |
-
, title="English to Latin Translator"
|
13 |
-
)
|
14 |
-
|
15 |
-
if __name__ == "__main__":
|
16 |
-
iface.launch()
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|