A hero in literary terms is the main character in a work who fights adversity through bravery, ingenuity, or strength. Regarding this definition, Portia is not a true hero. Although she manages to save Antonio's life, she does not face any danger. She, in fact, uses her privileged position and high-ranking contacts to disguise herself as a lawyer and intervene in Antonio's trial. Her ingenuity saves the day and harshly punishes Shylock for daring to harm a Venetian citizen. At no point in the play does Portia encounter danger or risk.
The one who is indeed at risk is Antonio. Since the play revolves mostly around his situation, which affects the actions of most of the other characters, he is, most certainly, the main character. Antonio takes a huge risk by signing a bond with Shylock, a man he despises and who passionately hates him. Antonio is, however, bold enough to help his dearest friend in spite of the harsh terms of Shylock's loan agreement.
When he defaults on his agreement, Antonio seems to accept his fate and is prepared to die at Shylock's hands after the money-lender refuses to negotiate new terms. It is Antonio's willingness to die and his consequent generosity towards Shylock at the end of Act 4, in spite of the moneylender's failed attempt to kill him, that makes him a real hero.