Update README.md
Browse files
README.md
CHANGED
|
@@ -42,15 +42,13 @@ This is the model card of a 🤗 transformers model that has been pushed on the
|
|
| 42 |
|
| 43 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 44 |
```python
|
| 45 |
-
from transformers import pipeline
|
| 46 |
|
| 47 |
checkpoint = "malteklaes/based-CodeBERTa-language-id-llm-module"
|
| 48 |
|
| 49 |
-
from transformers import TextClassificationPipeline
|
| 50 |
-
|
| 51 |
myPipeline = TextClassificationPipeline(
|
| 52 |
-
model=
|
| 53 |
-
tokenizer=
|
| 54 |
)
|
| 55 |
|
| 56 |
CODE_TO_IDENTIFY = "print('hello world')"
|
|
|
|
| 42 |
|
| 43 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 44 |
```python
|
| 45 |
+
from transformers import pipeline, TextClassificationPipeline, AutoTokenizer, AutoModelForSequenceClassification
|
| 46 |
|
| 47 |
checkpoint = "malteklaes/based-CodeBERTa-language-id-llm-module"
|
| 48 |
|
|
|
|
|
|
|
| 49 |
myPipeline = TextClassificationPipeline(
|
| 50 |
+
model=AutoModelForSequenceClassification.from_pretrained(checkpoint),
|
| 51 |
+
tokenizer=AutoTokenizer.from_pretrained(checkpoint)
|
| 52 |
)
|
| 53 |
|
| 54 |
CODE_TO_IDENTIFY = "print('hello world')"
|