Is the professor aware that you know it’s her partner that’s ill? If so, you can say it as directly as you want. If you want to keep it less personal, just send kind thoughts and best wishes to “you and your loved ones”. If you think it’s appropriate within the scope or your professional relationship, you could include some cheery flowers or plant, or maybe some small gift based on likes or hobbies of theirs, or some yummy treat that they might enjoy.