minimaxir / aitextgen

A robust Python tool for text-based AI training and generation using GPT-2.
https://docs.aitextgen.io
MIT License
1.84k stars 220 forks source link

custom name for output txts #157

Open cybergrunge-ops opened 3 years ago

cybergrunge-ops commented 3 years ago

please why cant i make custom file names for outputted txt files :(

minimaxir commented 3 years ago

What is the use case for that?

The current implementation is to ensure unique file names w/ the generation seed, so the file is never accidentally overwritten.

cybergrunge-ops commented 3 years ago

well i guess adding some custom prefix or timestamp more specifically would be useful. i am working on web implementation, and being able to name the txt files with some kind of prefix would be nice to organize files generated by different users or with different inputs - say so i can easily load with php all of the texts generated by a given input which i could give a prefix like "inputid3851". i guess i could do a workaround with php to just rename the file immediately after it is generated. i am just not familiar with python at all so i can't hack the source code currently.

cybergrunge-ops commented 3 years ago

also, sorry, i am self-taught and have a lot of gaps in my knowledge. since i dont know much about python i am using php shell exec to run the application on my web server.