Definitely York. It is all set up for visitors, with lots to see and do. The pedestrianised city centre is nice to walk around, especially lit up at night. There may be some interesting things to do in Leeds, but it is not such a nice place just to "be" as York.
The only reason to stay in Leeds would be if hotels are too expensive or booked up in York. There is a good train and bus service between the two cities.