The structures of both the moleculse are given as follows :
`{:(overset(delta-)O=overset(delta+)C=overset(delta-)S," "overset(delta-)S=overset(delta+)C=overset(delta-)S),("(Polar) ", " (Non-polar)"):}`
Both are linear molecule but in OCS, the bond polarities do not completely cancel out because it is not of symmetrical nature. However, they get cancelled in `CS_(2)` molecule due to its linear and symmetrical nature. Thus, OCS is polar and has dipole moment with `CS_(2)` is non-polar and has zero dipole moment.