Shami2English / app.py
guymorlan's picture
Update app.py
28f75ea
raw
history blame
346 Bytes
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 = pipeline(text, max_length=1024)
st.write("Translation:", result[0]['translation_text'])