ibra commited on
Commit
2f4b95c
·
verified ·
1 Parent(s): 428e145

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
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)