As part of the STEP UP project, a national initiative to empower high school teachers to inspire young women to pursue physics degrees in college, we developed two lessons for high school physics classes that are intended to facilitate the physics identity development of female students. One discusses physics careers and links to students' own values and goals; the other focuses on a discussion of underrepresentation of women in physics with the intention of having students elicit and examine stereotypes in physics. In piloting these lessons, we found statistically significant improvements in students' identities, particularly recognition beliefs (feeling recognized by others as a physics person) and beliefs in a future physics career. Moreover, female students have larger gains than male students in future beliefs (seeing themselves as physicists in the future) from both lessons, which makes it promising to contribute to alleviating the underrepresentation of women in physics. Using structural equation modeling, we test a path model of various physics identity constructs, extending an earlier, established model. In this paper, we also compare a preliminary structural analysis of students' physics identities before and after the career lesson, with an eye towards understanding how students' identities develop over time and due to these experiences.