aryrk commited on
Commit
ff089f0
·
1 Parent(s): 8130b3c

[fix] update image result reader

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -26,11 +26,8 @@ if not os.path.exists(expected_model_path):
26
  def reflection_removal(input_images):
27
  for input_image in input_images:
28
  file_path = os.path.join(UPLOAD_DIR, os.path.basename(input_image.name))
29
- print(f"Menyimpan file {input_image.name} ke {file_path}")
30
  shutil.copy(input_image.name, file_path)
31
 
32
- print("Isi direktori uploaded_images:", os.listdir(UPLOAD_DIR))
33
- print("Input images:", input_images)
34
 
35
  cmd = [
36
  "python", "test.py",
@@ -47,7 +44,7 @@ def reflection_removal(input_images):
47
  output_images = []
48
  for root, _, files in os.walk(RESULTS_DIR):
49
  for file in files:
50
- if file.endswith("_fake_B.png"):
51
  output_images.append(Image.open(os.path.join(root, file)))
52
 
53
  return output_images
 
26
  def reflection_removal(input_images):
27
  for input_image in input_images:
28
  file_path = os.path.join(UPLOAD_DIR, os.path.basename(input_image.name))
 
29
  shutil.copy(input_image.name, file_path)
30
 
 
 
31
 
32
  cmd = [
33
  "python", "test.py",
 
44
  output_images = []
45
  for root, _, files in os.walk(RESULTS_DIR):
46
  for file in files:
47
+ if file.endswith("_fake.png"):
48
  output_images.append(Image.open(os.path.join(root, file)))
49
 
50
  return output_images