neelimapreeti297 commited on
Commit
94333b4
·
verified ·
1 Parent(s): 10f9111

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
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)