app.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
-
from transformers import BertTokenizer, BertModel
|
4 |
import torch.nn.functional as F
|
5 |
|
6 |
# Load model dan tokenizer dari Hugging Face
|
7 |
-
model_name = "shobrunjb/mtl-
|
8 |
tokenizer = BertTokenizer.from_pretrained(model_name)
|
9 |
|
10 |
class IndoBERTMultiTaskClassifier(torch.nn.Module):
|
@@ -27,7 +27,7 @@ class IndoBERTMultiTaskClassifier(torch.nn.Module):
|
|
27 |
|
28 |
# Load the model
|
29 |
model = IndoBERTMultiTaskClassifier(
|
30 |
-
bert_model_name="
|
31 |
num_labels_task1=3, # Adjust with your task1 classes
|
32 |
num_labels_task2=3 # Adjust with your task2 classes
|
33 |
)
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
+
from transformers import BertTokenizer, BertModel
|
4 |
import torch.nn.functional as F
|
5 |
|
6 |
# Load model dan tokenizer dari Hugging Face
|
7 |
+
model_name = "shobrunjb/mtl-indoBERT-product-review"
|
8 |
tokenizer = BertTokenizer.from_pretrained(model_name)
|
9 |
|
10 |
class IndoBERTMultiTaskClassifier(torch.nn.Module):
|
|
|
27 |
|
28 |
# Load the model
|
29 |
model = IndoBERTMultiTaskClassifier(
|
30 |
+
bert_model_name="shobrunjb/mtl-indoBERT-product-review",
|
31 |
num_labels_task1=3, # Adjust with your task1 classes
|
32 |
num_labels_task2=3 # Adjust with your task2 classes
|
33 |
)
|