What happened that led to the creation of the French Republic