Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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()
|