long292 commited on
Commit
a8baeff
·
verified ·
1 Parent(s): 2d09e70

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ pipe = pipeline("text2text-generation", model="long292/bartpho-word")
2
+ def translate_HV(from_text):
3
+ results = translation_pipeline(from_text)
4
+ return results[0]['generated_text']
5
+ interface = gr.Interface(fn = translate_HV, inputs=gr.inputs.Textbox(lines=2, placeholder='Text to translate'),
6
+ outputs = 'text')
7
+ interface.launch()