From 87022d9f5c40c35c43e3de4c705f76b876261d2a Mon Sep 17 00:00:00 2001
From: Alice BRENON <alice.brenon@ens-lyon.fr>
Date: Tue, 19 Sep 2023 12:55:30 +0200
Subject: [PATCH] Improving BERT's init message a bit

---
 scripts/ML/BERT.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/scripts/ML/BERT.py b/scripts/ML/BERT.py
index ec4381c..126d4e7 100644
--- a/scripts/ML/BERT.py
+++ b/scripts/ML/BERT.py
@@ -5,10 +5,12 @@ class BERT:
     model_name = 'bert-base-multilingual-cased'
 
     def __init__(self, path):
-        print('Loading BERT tools…')
-        self.tokenizer = BertTokenizer.from_pretrained(BERT.model_name)
-        print('✔️ tokenizer')
         self.device = get_device()
+        print('Loading BERT tools')
+        print(' - tokenizer', end='')
+        self.tokenizer = BertTokenizer.from_pretrained(BERT.model_name)
+        print('\r✔️  tokenizer')
+        print(' - classifier', end='')
         bert = BertForSequenceClassification.from_pretrained(path)
         self.model = bert.to(self.device.type)
-        print('✔️ classifier')
+        print('\r✔️  classifier')
-- 
GitLab