File size: 253 Bytes
2778c6d
ff6fdec
 
 
 
 
 
 
 
19fc902
1
2
3
4
5
6
7
8
9
10
from transformers import pipeline
import streamlit as st

inp=st.text_input("Enter the text")
btn=st.button("Submit")

pipe=pipeline(task='translation',model='Helsinki-NLP/opus-mt-en-roa')

if(inp and btn):
    st.write(pipe(inp)[0]['translation_text'])