IBounhas commited on
Commit
5a59af5
·
1 Parent(s): dd45eb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -6,7 +6,11 @@ def analyze_text(input):
6
  result = predict_similarity(input)
7
  return result
8
 
 
 
 
9
  param_model_name="CAMeL-Lab/bert-base-arabic-camelbert-msa-sixteenth"
 
10
  tokenizer = CustomBertTokenizer.from_pretrained(param_model_name)
11
  class BertForSTS(torch.nn.Module):
12
 
 
6
  result = predict_similarity(input)
7
  return result
8
 
9
+ class CustomBertTokenizer(BertTokenizer):
10
+ def __init__(self, *args, **kwargs):
11
+ super(CustomBertTokenizer, self).__init__(*args, **kwargs)
12
  param_model_name="CAMeL-Lab/bert-base-arabic-camelbert-msa-sixteenth"
13
+
14
  tokenizer = CustomBertTokenizer.from_pretrained(param_model_name)
15
  class BertForSTS(torch.nn.Module):
16