Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to mimic the API's result #149

Open
thijssdaniels opened this issue Feb 1, 2023 · 0 comments
Open

Trying to mimic the API's result #149

thijssdaniels opened this issue Feb 1, 2023 · 0 comments

Comments

@thijssdaniels
Copy link

First of all, amazing work on the library!

I'm trying to mimic the result I get when I use the API for my text, however, in my Jupyter Notebook I'm getting a different result. I'm using the following code to get the summary:

`
LANG_MODEL='distilbert-base-uncased'

custom_config = AutoConfig.from_pretrained(LANG_MODEL)
custom_config.output_hidden_states=True
custom_tokenizer = AutoTokenizer.from_pretrained(LANG_MODEL)
custom_model = AutoModel.from_pretrained(LANG_MODEL, config=custom_config)

model = Summarizer(custom_model=custom_model, custom_tokenizer=custom_tokenizer)
resp = model(text, num_sentences=6)
`

Could you please tell me what I'm doing wrong?

Thanks in advance!

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

No branches or pull requests

1 participant