Refrigerator won't work

The refrigerator will turn on and work for awhile, but will eventually quit working altogether on both the fridge and freezer area. I pulled the back off of it and cleaned everything, turned it on and it worked for awhile before quitting again. Suspect it might be the condenser fan but not sure. When it quits it sometimes makes a humming sound like something is trying to start but just can’t quite start.

Any ideas, or thoughts before we chunk it or call out a repairman?