Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
|
3 |
# Define a function that takes a text input and returns the result
|
4 |
def analyze_text(input):
|
@@ -6,9 +8,6 @@ def analyze_text(input):
|
|
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 = AutoTokenizer.from_pretrained(param_model_name)
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
3 |
+
|
4 |
|
5 |
# Define a function that takes a text input and returns the result
|
6 |
def analyze_text(input):
|
|
|
8 |
result = predict_similarity(input)
|
9 |
return result
|
10 |
|
|
|
|
|
|
|
11 |
param_model_name="CAMeL-Lab/bert-base-arabic-camelbert-msa-sixteenth"
|
12 |
|
13 |
tokenizer = AutoTokenizer.from_pretrained(param_model_name)
|