Spaces:
Sleeping
Sleeping
Commit ·
315f320
1
Parent(s): 5eaa513
second commit
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
# Gunakan IndoBERT
|
| 5 |
analyzer = pipeline(
|
| 6 |
"sentiment-analysis",
|
| 7 |
-
model="
|
| 8 |
)
|
| 9 |
|
| 10 |
def predict_sentiment(text):
|
|
@@ -18,7 +18,7 @@ demo = gr.Interface(
|
|
| 18 |
inputs=gr.Textbox(label="Masukkan teks bahasa Indonesia"),
|
| 19 |
outputs="text",
|
| 20 |
title="Analisis Sentimen Bahasa Indonesia",
|
| 21 |
-
description="Gunakan IndoBERT untuk mendeteksi sentimen positif / negatif / netral"
|
| 22 |
)
|
| 23 |
|
| 24 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
# Gunakan model IndoBERT yang sudah fine-tuned untuk sentimen
|
| 5 |
analyzer = pipeline(
|
| 6 |
"sentiment-analysis",
|
| 7 |
+
model="w11wo/indonesian-roberta-base-sentiment-classifier"
|
| 8 |
)
|
| 9 |
|
| 10 |
def predict_sentiment(text):
|
|
|
|
| 18 |
inputs=gr.Textbox(label="Masukkan teks bahasa Indonesia"),
|
| 19 |
outputs="text",
|
| 20 |
title="Analisis Sentimen Bahasa Indonesia",
|
| 21 |
+
description="Gunakan IndoBERT-RoBERTa untuk mendeteksi sentimen positif / negatif / netral"
|
| 22 |
)
|
| 23 |
|
| 24 |
demo.launch()
|