ysharma HF staff commited on
Commit
4192a3f
1 Parent(s): 1d945cf

Update app_dialogue.py

Browse files
Files changed (1) hide show
  1. app_dialogue.py +2 -2
app_dialogue.py CHANGED
@@ -89,7 +89,7 @@ def convert_to_rgb_pil(image):
89
  else:
90
  image.save(local_path)
91
 
92
- temp_file.close()
93
  print(f"# Return the path to the saved image as - {local_path}")
94
  return temp_file_path # Return the path to the saved image
95
 
@@ -126,7 +126,7 @@ def convert_to_rgb(filepath_or_pilimg):
126
  #temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=".jpg")
127
  #temp_file_path = temp_file.name
128
  alpha_composite.save(local_path)
129
- temp_file.close()
130
 
131
  print(f"# Return the path to the saved image as - {local_path}")
132
  return temp_file_path # Return the path to the saved image
 
89
  else:
90
  image.save(local_path)
91
 
92
+ #temp_file.close()
93
  print(f"# Return the path to the saved image as - {local_path}")
94
  return temp_file_path # Return the path to the saved image
95
 
 
126
  #temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=".jpg")
127
  #temp_file_path = temp_file.name
128
  alpha_composite.save(local_path)
129
+ #temp_file.close()
130
 
131
  print(f"# Return the path to the saved image as - {local_path}")
132
  return temp_file_path # Return the path to the saved image