Ashoka74 commited on
Commit
f6f6a12
1 Parent(s): 5814dd2

Update app_2.py

Browse files
Files changed (1) hide show
  1. app_2.py +4 -4
app_2.py CHANGED
@@ -580,7 +580,7 @@ def extract_foreground(image):
580
  if image is None:
581
  return None, gr.update(visible=True), gr.update(visible=True)
582
  result, rgba = run_rmbg(image)
583
- mask_mover.set_extracted_fg(rgba)
584
 
585
  return result, gr.update(visible=True), gr.update(visible=True)
586
 
@@ -999,7 +999,7 @@ def process_image(input_image, input_text):
999
  cropped_rgba = rgba[y_min:y_max+1, x_min:x_max+1]
1000
 
1001
  # Set extracted foreground for mask mover
1002
- mask_mover.set_extracted_fg(cropped_rgba)
1003
 
1004
  return annotated_frame, cropped_rgba, gr.update(visible=False), gr.update(visible=False)
1005
 
@@ -1128,7 +1128,7 @@ def process_image(input_image, input_text):
1128
  cropped_rgba = rgba[y_min:y_max+1, x_min:x_max+1]
1129
 
1130
  # Set extracted foreground for mask mover
1131
- mask_mover.set_extracted_fg(cropped_rgba)
1132
 
1133
  return annotated_frame, cropped_rgba, gr.update(visible=False), gr.update(visible=False)
1134
  return annotated_frame, None, gr.update(visible=False), gr.update(visible=False)
@@ -1370,7 +1370,7 @@ with block:
1370
  if image is None:
1371
  return None, gr.update(visible=True), gr.update(visible=True)
1372
  result, rgba = run_rmbg(image)
1373
- mask_mover.set_extracted_fg(rgba)
1374
 
1375
  return result, gr.update(visible=True), gr.update(visible=True)
1376
 
 
580
  if image is None:
581
  return None, gr.update(visible=True), gr.update(visible=True)
582
  result, rgba = run_rmbg(image)
583
+ # mask_mover.set_extracted_fg(rgba)
584
 
585
  return result, gr.update(visible=True), gr.update(visible=True)
586
 
 
999
  cropped_rgba = rgba[y_min:y_max+1, x_min:x_max+1]
1000
 
1001
  # Set extracted foreground for mask mover
1002
+ # mask_mover.set_extracted_fg(cropped_rgba)
1003
 
1004
  return annotated_frame, cropped_rgba, gr.update(visible=False), gr.update(visible=False)
1005
 
 
1128
  cropped_rgba = rgba[y_min:y_max+1, x_min:x_max+1]
1129
 
1130
  # Set extracted foreground for mask mover
1131
+ # mask_mover.set_extracted_fg(cropped_rgba)
1132
 
1133
  return annotated_frame, cropped_rgba, gr.update(visible=False), gr.update(visible=False)
1134
  return annotated_frame, None, gr.update(visible=False), gr.update(visible=False)
 
1370
  if image is None:
1371
  return None, gr.update(visible=True), gr.update(visible=True)
1372
  result, rgba = run_rmbg(image)
1373
+ # mask_mover.set_extracted_fg(rgba)
1374
 
1375
  return result, gr.update(visible=True), gr.update(visible=True)
1376