If you haven't already, play a couple of more turns. Your alliance with Japan has forced China to deal with them rather than you (the next turn China took 2 of Japan's cities just north of New Lagash). China now has to fight through Japanese territory to even get to you. The bad news might be that if China wipes out Japan they'll probably come after you next. The good news is this should give you some time to build up your military and as your FP is only 5 turns away (and very close to the front) this will greatly enhance the production of the cities you're trying to hang on to.
America doesn't seem to be taking the war too seriously. The started a warrior toward one of your cities. Those cities have 4+ units in them and can all be upgraded in the next couple of turns.
If it were me:
Upgrade to musketmen asap (you're trading for saltpeter, esp if you're getting it from Japan?). You have Leo's so it's fairly cheap to upgrade your pikemen (30) and spearmen (40). China has a mixture of Cav, riders and horsemen, so your musketmen will do well with everything except the cav. I think even vs cav fortified in a town it's just over a 50/50 proposition.
Lowering your science rate to 30% still gets gravity in 5, but ups your gpt greatly. You'll lose wines on your next turn also, but it looked like you made a 2/1 deal on them. Negotiate to sell your 2 for gpt (I think I got 38 and 36 gpt for them). Use the cash to upgrade/pop. You're happiness (perhaps due to the war) looked very good, so I don't think you need the wines?
Build musketmen near the front and Cav in the rear. A couple of cannon wouldn't hurt either. Upgrade any extra units in your southern cities and move them toward the front. This will take quite a few turns, but they are wasted in those southern cities (IMO).
Overall, I think you're ok. The alliance was a great move (for you, lol, not the Japanese) and should give you enough time to beef up your military.
Good luck!