Spaces:
Sleeping
Sleeping
Commit
•
ed229e6
1
Parent(s):
83702b1
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,14 @@
|
|
1 |
|
2 |
|
3 |
-
|
4 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
5 |
from transformers import pipeline
|
6 |
|
|
|
7 |
# Load the sentiment analysis model
|
8 |
model_name = "poom-sci/WangchanBERTa-finetuned-sentiment"
|
9 |
sentiment_analyzer = pipeline('sentiment-analysis', model=model_name)
|
|
|
1 |
|
2 |
|
|
|
3 |
import streamlit as st
|
4 |
+
TRANSFORMERS_PATH = '/Users/milerr/anaconda3/lib/python3.11/site-packages/pip'
|
5 |
+
sys.path.append(TRANSFORMERS_PATH)
|
6 |
+
from transformers import pipeline
|
7 |
+
|
8 |
+
# จากนั้นคุณสามารถนำโมดูลของ Transformers มาใช้ได้
|
9 |
from transformers import pipeline
|
10 |
|
11 |
+
|
12 |
# Load the sentiment analysis model
|
13 |
model_name = "poom-sci/WangchanBERTa-finetuned-sentiment"
|
14 |
sentiment_analyzer = pipeline('sentiment-analysis', model=model_name)
|