Update README.md
Browse files
README.md
CHANGED
|
@@ -41,7 +41,7 @@ def predict_NuExtract(model,tokenizer,text, schema,example = ["","",""]):
|
|
| 41 |
model = AutoModelForCausalLM.from_pretrained("numind/NuExtract-tiny", trust_remote_code=True)
|
| 42 |
tokenizer = AutoTokenizer.from_pretrained("numind/NuExtract-tiny", trust_remote_code=True)
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
model.eval()
|
| 47 |
|
|
@@ -71,6 +71,6 @@ schema = """{
|
|
| 71 |
}"""
|
| 72 |
|
| 73 |
prediction = predict_NuExtract(model,tokenizer,text, schema,example = ["","",""])
|
| 74 |
-
|
| 75 |
|
| 76 |
```
|
|
|
|
| 41 |
model = AutoModelForCausalLM.from_pretrained("numind/NuExtract-tiny", trust_remote_code=True)
|
| 42 |
tokenizer = AutoTokenizer.from_pretrained("numind/NuExtract-tiny", trust_remote_code=True)
|
| 43 |
|
| 44 |
+
model.to("cuda")
|
| 45 |
|
| 46 |
model.eval()
|
| 47 |
|
|
|
|
| 71 |
}"""
|
| 72 |
|
| 73 |
prediction = predict_NuExtract(model,tokenizer,text, schema,example = ["","",""])
|
| 74 |
+
print(prediction)
|
| 75 |
|
| 76 |
```
|