guymorlan commited on
Commit
fc97f19
1 Parent(s): 35d02ce

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+
4
+ pipeline = pipeline(task="translation", model="guymorlan/English2Shami")
5
+
6
+ st.title("English to Levantine Arabic")
7
+
8
+ text = st.text_input("Enter text to translate:")
9
+
10
+ if text:
11
+ result = pipeline(text, max_length=1024)
12
+ st.write(result[0]['translation_text'])