You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following this tutorial and was stuck on this part where you add the NER suggestions from the model, as the updated records were not uploaded due to an issue.
I ended up changing the code with the following, and now it works as expected:
records = list(dataset.records())
suggestions = [
predict_gliner(
model=gliner_model, text=sample.fields["text"], labels=labels, threshold=0.7
)
for sample in records
]
for record, suggestion in zip(records, suggestions):
print(record, suggestion)
record.suggestions.add(rg.Suggestion(question_name="span_label", value=suggestion))
dataset.records.log(records=records)
The text was updated successfully, but these errors were encountered:
javilonso
changed the title
[DOCS]
[DOCS] Token Classification tutorial Issue
Jan 15, 2025
javilonso
changed the title
[DOCS] Token Classification tutorial Issue
[DOCS] Token Classification tutorial Issue adding suggestions
Jan 15, 2025
Which page or section is this issue related to?
https://docs.argilla.io/latest/tutorials/token_classification/#add-initial-model-suggestions
I was following this tutorial and was stuck on this part where you add the NER suggestions from the model, as the updated records were not uploaded due to an issue.
I ended up changing the code with the following, and now it works as expected:
The text was updated successfully, but these errors were encountered: