The battery powering the motor will run down faster if it's also powering a generator to recharge it, than it would if it were just powering the bicycle.
Now if you could design it so the generator only kicks in when going downhil or when you're pedaling, that would be a different story.