1. - Top - End - #31
    Ettin in the Playground
    Join Date
    Dec 2010

    Default Re: Help a non-programmer install GPT-2 (and its prerequisites)

    Quote Originally Posted by Bohandas View Post
    That, plus changing a bunch of tabs to spaces, worked. I got it working shortly after you posted it.

    One more question. Is there any way to make it automatically log output text to a file? I recently lost some outputs because I forgot to copy and paste before closing the program.
    The line that says 'print(text)' is where the outputs are being generated. So you could instead write that to a file, like (at the same indent level where print is):

    Code:
    f = open("output.log","a")
    f.write(text)
    f.close()
    Or if you're running this from a console, you can add '> output.log' to print to a file rather than printing to the console. Like 'python whatever_program_file.py arg1 arg2 arg3 > output.log' where whatever_program_file.py is the name of this code file, and the arg1 arg2 arg3 are whatever and however many command-line arguments you're currently using.
    Last edited by NichG; 2020-10-14 at 06:18 AM.