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 am using beropic with llama3.1 for topic modelling. My text is long, so I use doc_length in TextGeneration().
Error:
File "/home/bert/lib/python3.11/site-packages/bertopic/representation/_utils.py", line 57, in truncate_document
return truncated_document
^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'truncated_document' where it is not associated with a value
Thanks for sharing! I believe you also need to specify the tokenizer for it to work. There's also a PR open for a fix that I will check out later this week. That said, should work by specifying tokenizer.
Thanks for sharing! I believe you also need to specify the tokenizer for it to work. There's also a PR open for a fix that I will check out later this week. That said, should work by specifying tokenizer.
Thanks for your quick reply!
Yes, it works after adding tokenizer.
Have you searched existing issues? 🔎
Desribe the bug
I am using beropic with llama3.1 for topic modelling. My text is long, so I use doc_length in TextGeneration().
Error:
File "/home/bert/lib/python3.11/site-packages/bertopic/representation/_utils.py", line 57, in truncate_document
return truncated_document
^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'truncated_document' where it is not associated with a value
Reproduction
BERTopic Version
0.16.4
The text was updated successfully, but these errors were encountered: