translate / app.py
sakunich's picture
Update app.py
22d2430
raw
history blame contribute delete
434 Bytes
import streamlit as st
from transformers import pipeline
classifier = pipeline("translation", model="sakunich/Translation")
def main():
st.title("Translation En to Ko")
with st.form("text_field"):
text = st.text_area('enter some text:')
clicked = st.form_submit_button("Translate")
if clicked:
results = classifier([text])
st.json(results)
if __name__ == "__main__":
main()