I walked my girlfriend through this scenario:
Go to both interviews, if you get offers from both companies, take some time to look at the offers from each, taking into account distance to work, extras one has over the other.
You then want to negociate with the 2nd best option, in order to get them to beat the first offer (what would it take for them to be the new #1). If you lose the offer due to them being unwilling to negociate, well it was number 2 anyways, so you take the #1.
If your negociation goes well, take that new offer from the company and go back to the #1 company (who's offer is now less attractive than the other) and attempt to get them to match and/or beat the offer.
You could keep playing one off the other, but that depends on how easy it is to move from one to another. Make sure to be open during the negociation process that you have two offers, and are trying to figure out which of the two is the best, and that even thought you are very interested in Company 1 or 2, the other offer is just better at this time.
Rinse and repeat, or accept the offer on the table when one of the two refuses to increase their offer.
This way, you are always in the best case scenario.