imvladikon commited on
Commit
f4dfaa2
1 Parent(s): c68b66f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -63
README.md CHANGED
@@ -44,54 +44,11 @@ This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that ca
44
  from span_marker import SpanMarkerModel
45
 
46
  # Download from the 🤗 Hub
47
- model = SpanMarkerModel.from_pretrained("span_marker_model_id")
48
- # Run inference
49
  entities = model.predict("None")
 
50
  ```
51
 
52
- ### Downstream Use
53
- You can finetune this model on your own dataset.
54
-
55
- <details><summary>Click to expand</summary>
56
-
57
- ```python
58
- from span_marker import SpanMarkerModel, Trainer
59
-
60
- # Download from the 🤗 Hub
61
- model = SpanMarkerModel.from_pretrained("span_marker_model_id")
62
-
63
- # Specify a Dataset with "tokens" and "ner_tag" columns
64
- dataset = load_dataset("conll2003") # For example CoNLL2003
65
-
66
- # Initialize a Trainer using the pretrained model & dataset
67
- trainer = Trainer(
68
- model=model,
69
- train_dataset=dataset["train"],
70
- eval_dataset=dataset["validation"],
71
- )
72
- trainer.train()
73
- trainer.save_model("span_marker_model_id-finetuned")
74
- ```
75
- </details>
76
-
77
- <!--
78
- ### Out-of-Scope Use
79
-
80
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
81
- -->
82
-
83
- <!--
84
- ## Bias, Risks and Limitations
85
-
86
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
87
- -->
88
-
89
- <!--
90
- ### Recommendations
91
-
92
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
93
- -->
94
-
95
  ## Training Details
96
 
97
  ### Framework Versions
@@ -105,6 +62,7 @@ trainer.save_model("span_marker_model_id-finetuned")
105
  ## Citation
106
 
107
  ### BibTeX
 
108
  ```
109
  @software{Aarsen_SpanMarker,
110
  author = {Aarsen, Tom},
@@ -113,21 +71,3 @@ trainer.save_model("span_marker_model_id-finetuned")
113
  url = {https://github.com/tomaarsen/SpanMarkerNER}
114
  }
115
  ```
116
-
117
- <!--
118
- ## Glossary
119
-
120
- *Clearly define terms in order to be accessible across audiences.*
121
- -->
122
-
123
- <!--
124
- ## Model Card Authors
125
-
126
- *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
127
- -->
128
-
129
- <!--
130
- ## Model Card Contact
131
-
132
- *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
133
- -->
 
44
  from span_marker import SpanMarkerModel
45
 
46
  # Download from the 🤗 Hub
47
+ model = SpanMarkerModel.from_pretrained("iahlt/xlm-roberta-base-ar-ner-flat")
 
48
  entities = model.predict("None")
49
+ print(entities)
50
  ```
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  ## Training Details
53
 
54
  ### Framework Versions
 
62
  ## Citation
63
 
64
  ### BibTeX
65
+
66
  ```
67
  @software{Aarsen_SpanMarker,
68
  author = {Aarsen, Tom},
 
71
  url = {https://github.com/tomaarsen/SpanMarkerNER}
72
  }
73
  ```