julian-schelb commited on
Commit
564c962
1 Parent(s): f80a6d9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -6
README.md CHANGED
@@ -6,9 +6,10 @@ language:
6
  widget:
7
  - text: "In December 1903 in France the Royal Swedish Academy of Sciences awarded Pierre Curie, Marie Curie, and Henri Becquerel the Nobel Prize in Physics."
8
  - text: "Für Richard Phillips Feynman war es immer wichtig in New York, die unanschaulichen Gesetzmäßigkeiten der Quantenphysik Laien und Studenten nahezubringen und verständlich zu machen."
9
- - text: "My name is Julian and I live in montreal"
10
- - text: "My name is clara and I live in berkeley, california."
11
- - text: "My name is wolfgang and I live in berlin"
 
12
  tags:
13
  - roberta
14
  license: mit
@@ -25,18 +26,22 @@ This model is limited by its training dataset of entity-annotated news articles
25
 
26
  ## Training data
27
 
 
28
 
29
  ## Usage
30
 
31
  ```python
 
32
 
33
- model = RobertaForTokenClassification.from_pretrained("julian-schelb/roberta-ner-multilingual/")
 
34
 
35
- text = "Für Richard Phillips Feynman war es immer wichtig in New York, die unanschaulichen Gesetzmäßigkeiten der Quantenphysik Laien und Studenten nahezubringen und verständlich zu machen."
36
 
37
  inputs = tokenizer(
38
  text,
39
- add_special_tokens=False, return_tensors="pt"
 
40
  )
41
 
42
  with torch.no_grad():
 
6
  widget:
7
  - text: "In December 1903 in France the Royal Swedish Academy of Sciences awarded Pierre Curie, Marie Curie, and Henri Becquerel the Nobel Prize in Physics."
8
  - text: "Für Richard Phillips Feynman war es immer wichtig in New York, die unanschaulichen Gesetzmäßigkeiten der Quantenphysik Laien und Studenten nahezubringen und verständlich zu machen."
9
+ - text: "My name is Julian and I live in Constance"
10
+ - text: "Terence David John Pratchett est le 28 avril 1948 à Beaconsfield dans le Buckinghamshire, en Angleterre."
11
+ - text: "北京市,通称北京(汉语拼音:Běijīng;邮政式拼音:Peking),简称“京”,是中华人民共和国的首都及直辖市,是该国的政治、文化、科技、教育、军事和国际交往中心,是一座全球城市,是世界人口第三多的城市和人口最多的首都,具有重要的国际影响力,同時也是目前世界唯一的“双奥之城”,即唯一既主办过夏季"
12
+ - text: "काठमाडौँ नेपालको सङ्घीय राजधानी र नेपालको सबैभन्दा बढी जनसङ्ख्या भएको सहर हो।"
13
  tags:
14
  - roberta
15
  license: mit
 
26
 
27
  ## Training data
28
 
29
+ ## Metrics
30
 
31
  ## Usage
32
 
33
  ```python
34
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
35
 
36
+ tokenizer = AutoTokenizer.from_pretrained("julian-schelb/roberta-ner-multilingual/", add_prefix_space=True)
37
+ model = AutoModelForTokenClassification.from_pretrained("julian-schelb/roberta-ner-multilingual/")
38
 
39
+ text = "In December 1903 in France the Royal Swedish Academy of Sciences awarded Pierre Curie, Marie Curie, and Henri Becquerel the Nobel Prize in Physics."
40
 
41
  inputs = tokenizer(
42
  text,
43
+ add_special_tokens=False,
44
+ return_tensors="pt"
45
  )
46
 
47
  with torch.no_grad():