Bill Cosby thinks R. Kelly got a raw deal with a guilty verdict in his federal sex crimes case ... and he's blaming Gloria Allred and systemic racism. We got Cosby's spokesman, Andrew Wyatt, at Avra in Beverly Hills and asked what his client's reaction was to Kelly's conviction on all 9 counts. He told us, Cosby said, "The guy was railroaded."