Spaces:
Runtime error
Runtime error
import streamlit as st | |
from transformers import pipeline | |
pipeline = pipeline(task="translation", model="guymorlan/Shami2English") | |
st.title("Translate Levantine Arabic to English") | |
text = st.text_input("Enter text to translate:") | |
if text: | |
result = model(text, max_length=1024) | |
st.write("Translation:", result[0]['translated_text']) |