ibra
commited on
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
|
3 |
+
# Memuat model IndoBERT
|
4 |
+
classifier = pipeline("text-classification", model="indobenchmark/indobert-base-p1")
|
5 |
+
|
6 |
+
# Fungsi untuk memproses input
|
7 |
+
def classify_text(text):
|
8 |
+
return classifier(text)
|