qanastek commited on
Commit
f45f707
1 Parent(s): 790fd5d
Files changed (3) hide show
  1. 123.png +0 -0
  2. README.md +2 -0
  3. predict.py +2 -1
123.png ADDED
README.md CHANGED
@@ -146,6 +146,8 @@ print(res)
146
 
147
  Outputs:
148
 
 
 
149
  ```python
150
  [{'word': '▁neuf', 'score': 0.9911066293716431, 'entity': 'B-time', 'index': 6, 'start': 15, 'end': 19},
151
  {'word': '▁heures', 'score': 0.9200698733329773, 'entity': 'I-time', 'index': 7, 'start': 20, 'end': 26},
 
146
 
147
  Outputs:
148
 
149
+ ![English - Hebrew - Spanish](123.png)
150
+
151
  ```python
152
  [{'word': '▁neuf', 'score': 0.9911066293716431, 'entity': 'B-time', 'index': 6, 'start': 15, 'end': 19},
153
  {'word': '▁heures', 'score': 0.9200698733329773, 'entity': 'I-time', 'index': 7, 'start': 20, 'end': 26},
predict.py CHANGED
@@ -3,7 +3,8 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification, TokenCl
3
  tokenizer = AutoTokenizer.from_pretrained('qanastek/XLMRoberta-Alexa-Intents-NER-NLU')
4
  model = AutoModelForTokenClassification.from_pretrained('qanastek/XLMRoberta-Alexa-Intents-NER-NLU')
5
  predict = TokenClassificationPipeline(model=model, tokenizer=tokenizer)
6
- res = predict("je veux écouter la chanson de jacques brel encore une fois")
 
7
 
8
  for r in res:
9
  print(r)
 
3
  tokenizer = AutoTokenizer.from_pretrained('qanastek/XLMRoberta-Alexa-Intents-NER-NLU')
4
  model = AutoModelForTokenClassification.from_pretrained('qanastek/XLMRoberta-Alexa-Intents-NER-NLU')
5
  predict = TokenClassificationPipeline(model=model, tokenizer=tokenizer)
6
+ res = predict("réveille-moi à neuf heures du matin le vendredi")
7
+ # res = predict("je veux écouter la chanson de jacques brel encore une fois")
8
 
9
  for r in res:
10
  print(r)