Update pi_demo.py