amirgame197 commited on
Commit
03eb2f0
1 Parent(s): cefe7bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,10 +20,10 @@ def doo(video, color, mode, progress=gr.Progress()):
20
  rgb = tuple(int(color[i:i+2], 16) for i in (0, 2, 4))
21
  color = str(list(rgb))
22
  elif str(color).startswith('rgba'):
23
- rgba_match = re.match(r'rgba\((\d+), (\d+), (\d+), ([\d.]+)\)', str(color))
24
  if rgba_match:
25
- r, g, b, _ = rgba_match.groups()
26
- color = str([int(r), int(g), int(b)])
27
  print(color)
28
  if mode == 'Fast':
29
  remover = Remover(mode='fast')
 
20
  rgb = tuple(int(color[i:i+2], 16) for i in (0, 2, 4))
21
  color = str(list(rgb))
22
  elif str(color).startswith('rgba'):
23
+ rgba_match = re.match(r'rgba\(([\d.]+), ([\d.]+), ([\d.]+), [\d.]+\)', color)
24
  if rgba_match:
25
+ r, g, b = rgba_match.groups() # Extract r, g, b values
26
+ color = str([int(float(r)), int(float(g)), int(float(b))])
27
  print(color)
28
  if mode == 'Fast':
29
  remover = Remover(mode='fast')