No, X and Y are not independent. If Y = 0, then X can be in [0, 1], whereas if Y = 1, X = 0 necessarily.

A quick check on dependence in situations like this is to note that independent random variables always have support that is a Cartesian Product of sets i.e. the possible values of X cannot depend on Y and vice versa.