init
Browse files
app.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
|
| 4 |
+
# สร้างโมเดลสำหรับ Sentiment Analysis
|
| 5 |
+
sentiment_analyzer = pipeline('sentiment-analysis')
|
| 6 |
+
|
| 7 |
+
st.title('Sentiment Analysis App')
|
| 8 |
+
|
| 9 |
+
text = st.text_area('Enter text to analyze:')
|
| 10 |
+
if st.button('Analyze'):
|
| 11 |
+
result = sentiment_analyzer(text)
|
| 12 |
+
st.write(result)
|