English2Shami / app.py
guymorlan's picture
Create app.py
fc97f19
raw
history blame
320 Bytes
import streamlit as st
from transformers import pipeline
pipeline = pipeline(task="translation", model="guymorlan/English2Shami")
st.title("English to Levantine Arabic")
text = st.text_input("Enter text to translate:")
if text:
result = pipeline(text, max_length=1024)
st.write(result[0]['translation_text'])