Spaces:
Sleeping
Sleeping
File size: 258 Bytes
b2e759c |
1 2 3 4 5 6 7 8 9 10 |
import streamlit as st
from transformers import pipeline
prompt = st.text_area("Enter text to translate to Spanish:")
if prompt:
translator = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
out = translator(prompt)
st.json(out) |