0llheaven commited on
Commit
3acf586
·
verified ·
1 Parent(s): 053967e
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
+ # สร้างโมเดลสำหรับ 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)