To authorize, upon appeal in specific cases, such variance from the terms of this code as will not be contrary to the public interest where, owing to special conditions, a literal enforcement will result in practical difficulty or unnecessary hardship, so that the spirit of the code shall be observed, public safety and welfare secured and substantial justice done; provided, however, that no such action shall have the effect of establishing in any district a use or uses not permitted in such district.