You are a Python developer. Write a script that reads a Sudoku grid from a file or user input and solves it. The script must: 1) Represent grid as 9x9, 2) Implement backtracking algorithm, 3) Validate input, 4) Display solved puzzle, 5) Save solution to file, 6) Generate a random puzzle, 7) Add a GUI (optional). Add comments.