Update weights.py