Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
|
|
6 |
#task1
|
7 |
model_name = "bert-base-multilingual-cased"
|
8 |
tokenizer = BertTokenizer.from_pretrained(model_name)
|
9 |
-
model_load=BertForSequenceClassification.from_pretrained("
|
10 |
def fun_task1(Text):
|
11 |
if(Text==""):
|
12 |
return "অনুগ্রহ করে প্রথমে টেক্সট লিখুন। (Please enter the text first)"
|
@@ -20,7 +20,7 @@ def fun_task1(Text):
|
|
20 |
return "দাবি (Claim)"
|
21 |
#task2
|
22 |
from sentence_transformers.cross_encoder import CrossEncoder
|
23 |
-
model_load_task2=CrossEncoder("
|
24 |
def fun_task2(Text1,Text2):
|
25 |
if(Text1=="" or Text2==""):
|
26 |
return "অনুগ্রহ করে প্রথমে টেক্সট লিখুন। (Please enter the text first.)"
|
|
|
6 |
#task1
|
7 |
model_name = "bert-base-multilingual-cased"
|
8 |
tokenizer = BertTokenizer.from_pretrained(model_name)
|
9 |
+
model_load=BertForSequenceClassification.from_pretrained("bert-base-multilingual-cased_finetune_FinArgBengali",num_labels=2)
|
10 |
def fun_task1(Text):
|
11 |
if(Text==""):
|
12 |
return "অনুগ্রহ করে প্রথমে টেক্সট লিখুন। (Please enter the text first)"
|
|
|
20 |
return "দাবি (Claim)"
|
21 |
#task2
|
22 |
from sentence_transformers.cross_encoder import CrossEncoder
|
23 |
+
model_load_task2=CrossEncoder("task2-crossEncoder-bert-base-multilingual-cased",num_labels=3)
|
24 |
def fun_task2(Text1,Text2):
|
25 |
if(Text1=="" or Text2==""):
|
26 |
return "অনুগ্রহ করে প্রথমে টেক্সট লিখুন। (Please enter the text first.)"
|