No - sorry you have signed a 6-month contract and there really is no getting out of it. You can put in notice after 5 months, and then get out at 6 months but not before then. Sorry
The only way out of it is ,if the landlord agrees,you find new tenants for the place.Its not getting out of it as such,but it gets you out and the landlord wont lose out
similar to what aya says... if you did it through an agent, tell them you want to move and you need them to find another tennant. one of my tennants wanted to move out cos they got a mortgage on another property, so the agent found me another tennant and let the original lady out early. no-one loses, i got my rent, tennant moved to her new house and agent still got their monthly cut.