Surface effects in the electronic properties of YBa2Cu3O7