I want to generate topics and subtopics from a corpus. It would be great if someone could share the python code.
I want to generate topics and subtopics from a corpus. It would be great if someone could share the python code.
Well, the simplest way to do this would be by using the hugginface library. They already have scripts for generating text from several generative models, including gpt-2.The script you're looking for is run_generation.py.You can provide prompts of varying lengths and it can generate text using them.