Spaces:
Running
Running
Merge branch 'main' of https://huggingface.co/spaces/ZombitX64/SpaceThai-sentiment-e5
Browse files
README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
---
|
| 2 |
title: SpaceThai Sentiment E5
|
| 3 |
emoji: 📉
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.38.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: cc-by-nc-4.0
|
| 11 |
-
short_description:
|
| 12 |
---
|
| 13 |
|
| 14 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
title: SpaceThai Sentiment E5
|
| 3 |
emoji: 📉
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.38.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: cc-by-nc-4.0
|
| 11 |
+
short_description: วิเคราะอารมณ์จากข้อความภาษาไทยและภาษาอื่นๆที่รองรับ
|
| 12 |
---
|
| 13 |
|
| 14 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
|
|
|
| 4 |
|
| 5 |
# รายชื่อโมเดลที่ให้เลือก
|
| 6 |
MODEL_LIST = [
|
|
@@ -24,6 +25,10 @@ from functools import lru_cache
|
|
| 24 |
@lru_cache(maxsize=2)
|
| 25 |
def get_nlp(model_name):
|
| 26 |
return pipeline("sentiment-analysis", model=model_name)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
label_map = {
|
| 29 |
"LABEL_0": 0,
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
<<<<<<< HEAD
|
| 5 |
|
| 6 |
# รายชื่อโมเดลที่ให้เลือก
|
| 7 |
MODEL_LIST = [
|
|
|
|
| 25 |
@lru_cache(maxsize=2)
|
| 26 |
def get_nlp(model_name):
|
| 27 |
return pipeline("sentiment-analysis", model=model_name)
|
| 28 |
+
=======
|
| 29 |
+
model_name = "ZombitX64/Sentiment-03"
|
| 30 |
+
nlp = pipeline("sentiment-analysis", model=model_name)
|
| 31 |
+
>>>>>>> 9fff20c2f551dc64f34e70b76c0606f173cd3464
|
| 32 |
|
| 33 |
label_map = {
|
| 34 |
"LABEL_0": 0,
|