2

I want to generate topics and subtopics from a corpus. It would be great if someone could share the python code.

1 Answers1

1

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.

Zain Sarwar
  • 1,226
  • 8
  • 10