That's a little half gallon unheated container.. Where is her dorsal fin?!
More info is needed: http://www.bettafish.com/showthread.php?t=49233
But i can pretty much guarantee you're going to need this info.. She's dying from ammonia/nitrite poisoning and maybe columnaris or other nasty bacterial infection from chronically poor conditions..
You need to address everything below ASAP, and you need meds.. I suggest Kanaplex. If you cannot find it look for Triple sulfa or Maracyn 1 and 2 (treat maracyns togther). Once you have a med post back and we can teach you how t wet dilute. Also for now, don't let temps rise above 76, because columnaris will speed up with higher temps and you don't want it to take him before you can treat it.
Bettas need to be kept in 2 gallons minimum. In these twice weekly water changes of 50% and 100% are needed. Bettas kept in 1 gallon containers live an average of about 2 years compared to double that+ in larger containers. The 1 gallon would need 3 weekly water changes of 50%, 50% and 100%, and even then they will be subjected to ammonia. That half gallon should be VERY temporary and require 100% daily changes.
The 50% changes the betta can be kept in the bowl and use a turkey baster to remove half the water and as much of the debris as possible. For the 100% you need to remove him - scoop him out with a plastic solo type cup and set aside while you thoroughly rinse the bowl and gravel to remove the debris. Then he should be acclimated to the new water by floating for an hour while you slowly add a couple tablespoons of new water to the cup every 10 minutes. When you release him, try to let as little of the old cup water back into the tank as possible. All water changes should use same temp water, matched to running tap using the in tank thermometer and the water needs to be premixed with conditioner before adding it to the betta tank. If you don't already have anything, you can use gallon water jugs from the grocery store - rinsed thoroughly in hot water but no chems.
Bettas are tropical fish and must be kept at a temp between 76-82, with 78-80 being ideal. The temp must be stable and not be dipping or jumping around. In a 2 gallon you can get an adjustable 25w heater. Any new heater should be tested for 24 hours in similar size container with in tank thermometer to make sure it will hold a constant appropriate temp between 78-80F. Then the betta must be acclimated to higher temp either by floating in a cup inside the main already fully heated tank for an hour, or by adjusting the heater to increase the temperature of the tank no more than a degree per hour and 5 degrees per day.
Flakes aren't good nutritional value, and especially with something this small they muck up the water quickly causing excess ammonia. You should look for a good quality pellets whose first two or three ingredients are whole fish, not fish meal or wheat. He should be fed two small meals a day (how many depends on the pellet you pick up) and one fast day a week.