Thank you @Dwight_Foster , I fixed the issue. The webcam is opening but freezing in a second.
Also getting a new error:
<PIL.Image.Image image mode=RGB size=420x350 at 0x2875F135700>
tensor([[[[ 0.5707,  0.5707,  0.6221,  …,  0.1939,  0.2111,  0.2111],
[ 0.5878,  0.5707,  0.6049,  …,  0.1939,  0.2111,  0.2111],
[ 0.6049,  0.5707,  0.5878,  …,  0.1939,  0.2111,  0.2111],
…,
[-1.4843, -1.4843, -1.5014,  …,  0.3309,  0.3481,  0.3309],
[-1.4843, -1.4672, -1.3473,  …,  0.3138,  0.3309,  0.3138],
[-1.4672, -1.4672, -1.3302,  …,  0.3138,  0.3309,  0.3309]],
     [[ 0.6604,  0.6604,  0.7129,  ...,  0.1877,  0.2052,  0.2052],
      [ 0.6779,  0.6604,  0.6954,  ...,  0.1877,  0.2052,  0.2052],
      [ 0.6954,  0.6604,  0.6779,  ...,  0.1877,  0.2052,  0.2052],
      ...,
      [-1.5280, -1.5280, -1.5455,  ...,  0.5028,  0.5203,  0.5028],
      [-1.5280, -1.4930, -1.3880,  ...,  0.4853,  0.5028,  0.4853],
      [-1.4930, -1.4930, -1.3529,  ...,  0.4853,  0.5028,  0.5028]],

     [[ 0.9494,  0.9494,  1.0017,  ...,  0.2871,  0.3045,  0.3045],
      [ 0.9668,  0.9494,  0.9842,  ...,  0.2871,  0.3045,  0.3045],
      [ 0.9842,  0.9494,  0.9668,  ...,  0.2871,  0.3045,  0.3045],
      ...,
      [-1.2467, -1.2467, -1.2641,  ...,  0.7576,  0.7751,  0.7576],
      [-1.2467, -1.2293, -1.1247,  ...,  0.7402,  0.7576,  0.7402],
      [-1.2293, -1.2467, -1.1247,  ...,  0.7402,  0.7576,  0.7576]]]])


TypeError                                 Traceback (most recent call last)
 in 
87         result,score = argmax(prediction)
88         fps = 0
—> 89         if result >= 0.5:
90             show_res  = result
91             show_score= score
TypeError: ‘>=’ not supported between instances of ‘str’ and ‘float’