Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|