Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,13 +3,12 @@ import torch
|
|
| 3 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 4 |
|
| 5 |
# Load the trained model and tokenizer
|
| 6 |
-
model_path = 'viv/AIKIA'
|
| 7 |
tokenizer = AutoTokenizer.from_pretrained("nlpaueb/bert-base-greek-uncased-v1")
|
| 8 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
| 9 |
|
| 10 |
# Preprocessing function for Greek text
|
| 11 |
def preprocessing_greek(text):
|
| 12 |
-
# Your preprocessing steps
|
| 13 |
text = text.lower() # Example step
|
| 14 |
return text
|
| 15 |
|
|
|
|
| 3 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 4 |
|
| 5 |
# Load the trained model and tokenizer
|
| 6 |
+
model_path = 'viv/AIKIA' # Make sure this is correct, either local path or Hugging Face path
|
| 7 |
tokenizer = AutoTokenizer.from_pretrained("nlpaueb/bert-base-greek-uncased-v1")
|
| 8 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
| 9 |
|
| 10 |
# Preprocessing function for Greek text
|
| 11 |
def preprocessing_greek(text):
|
|
|
|
| 12 |
text = text.lower() # Example step
|
| 13 |
return text
|
| 14 |
|