update sample.py, GUI