Jacinta Street, 25, had been injured during a domestic incident involving her ex-partner at a house in Holbeck on February 27 this year.
A member of the public was walking past the house at around 6.15pm, when they heard a woman screaming for help and a man shouting at her.
Police were called out and found Street with bruising and cuts to her face, consistent with being assaulted.
They also found her ex-partner with part of his ear bitten off.
When police looked around the house, they found signs of a serious struggle and the place was left in “disarray”, Leeds Crown Court head.
Both were arrested on suspicion of assault and later charged - although the charges relating to the domestic incident were dropped before a trial.
Paramedics were called to the house and Street was taken to the A&E department of the LGI for treatment.
Two police officers went with her and while she was waiting for treatment, she asked them what was going to happen to her.
Prosecutor Gerald Hendron said Street became "angry and upset" when she was told she would be taken to Elland Road Police Station, and "began swearing" at one of the officers.
She shouted: "I’m not under arrest, you’re lying. You’re all bent, I need to go home.”
Street continued shouting at the officers until she wore herself out.
At 9.20pm, Street was moved from a cubicle into a side ward by a hospital porter.
When officers tried to go with her, she refused to let them into the room and tried to close the door on one of them.
She then shouted, “get off me, get off me” and swung her right arm with an open palm towards one of the officers. She struck him hard on the left side of his face.
A struggle ensued as the officers tried to restrain Street, before they eventually put her onto the floor.
She continued to fight but was restrained eventually and placed in handcuffs, before being placed on the hospital bed where she received treatment for her injuries.
Street, who has no previous convictions or cautions, later apologised to the police officer for assaulting him.
She pleaded guilty to assaulting an emergency officer at the earliest opportunity.
The officer suffered no visible injuries or psychological harm from the attack, but felt pain to his face.
“This was a prolonged assault, a struggle,” Mr Hendron added.
Mitigating, Richard Canning said Street’s baby was due in September and she had arrangements in place to move to Wales to live with her mum, with a job waiting for her.
He said a community order in Leeds could have "severe implications" for her with a newborn, without the support of her mum.
Street, of Cross Green Lane, Halton, was conditionally discharged for a period of two years.
Passing his sentence, Judge Robin Mairs noted that Street was in "considerable distress" at the time the attack took place.
He added: “I have little doubt that after going 25 years without getting into trouble, you are not likely to again.
“Stay out of bother for the next two years and you won’t hear anything more about that.
“Get into trouble again, and that may come back to bite you.”