Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
+
# from pathlib import Path
|
4 |
+
st.title("wanneemee KHAW-RAI")
|
5 |
+
st.subheader("kummakornKHAW kuuynaijor")
|
6 |
+
|
7 |
+
text = st.text_area('KHAW nai kub', '', height=200)
|
8 |
+
# st.write('This KHAW? -->', text)
|
9 |
+
|
10 |
+
if st.button('Generate headline'):
|
11 |
+
summarizer = pipeline("summarization", model = "pannawittt/ruanglao-wanni" )
|
12 |
+
headline = summarizer(text, max_length=256)
|
13 |
+
desired_text = headline[0]['summary_text']
|
14 |
+
st.write(desired_text)
|