Skip to content

Conversation

@jackboyla
Copy link
Contributor

Nice work on GLiNER decoder! I was just trying it out but noticed that the example passes text as a string:

from gliner import GLiNER

model = GLiNER.from_pretrained("knowledgator/gliner-decoder-large-v1.0")

text = (
    "Apple was founded as Apple Computer Company on April 1, 1976, "
    "by Steve Wozniak, Steve Jobs (1955–2011) and Ronald Wayne to "
    "develop and sell Wozniak's Apple I personal computer."
)

labels = ["person", "other"]

model.run(text, labels, threshold=0.3, num_gen_sequences=1)

This results in the string being split into characters. I just added a check to see if texts is a string and if so, convert it to a list.

@Ingvarstep Ingvarstep merged commit 479cb08 into urchade:main Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants