Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import torch
|
3 |
+
|
4 |
+
from germantoenglish import Seq2SeqTransformer, translate, greedy_decode
|
5 |
+
|
6 |
+
|
7 |
+
if __name__ == "__main__":
|
8 |
+
iface = gr.Interface(
|
9 |
+
fn=translate,
|
10 |
+
inputs=[
|
11 |
+
gr.components.Textbox(label="Text")
|
12 |
+
|
13 |
+
],
|
14 |
+
outputs=["text"],
|
15 |
+
cache_examples=False,
|
16 |
+
title="GermanToEnglish",
|
17 |
+
)
|
18 |
+
|
19 |
+
iface.launch(share=True)
|