sylvain471 commited on
Commit
9169423
·
verified ·
1 Parent(s): 8b8897f

Update README.md

Browse files

fix readme example

Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -51,11 +51,11 @@ from io import BytesIO
51
  from PIL import Image
52
  import json
53
 
54
- input_path = os.environ["SCRIPT_INPUT"]
55
- output_path = os.environ["SCRIPT_OUTPUT"]
56
 
57
  # Load JSON input
58
- with open(input_path, "r") as f:
59
  data = json.load(f)
60
  img_b64 = data["img"]
61
 
@@ -68,7 +68,7 @@ img.load() # ⬅️ Ensure image is fully loaded before processing
68
  flipped = img.transpose(Image.FLIP_LEFT_RIGHT)
69
 
70
  # Save output
71
- flipped.save(os.path.join(output_path, "flipped.png"))
72
  print("Image flipped and saved as flipped.png.")
73
  ```
74
 
 
51
  from PIL import Image
52
  import json
53
 
54
+ #input_path = os.environ["SCRIPT_INPUT"]
55
+ #output_path = os.environ["SCRIPT_OUTPUT"]
56
 
57
  # Load JSON input
58
+ with open("input.txt", "r") as f:
59
  data = json.load(f)
60
  img_b64 = data["img"]
61
 
 
68
  flipped = img.transpose(Image.FLIP_LEFT_RIGHT)
69
 
70
  # Save output
71
+ flipped.save("flipped.png")
72
  print("Image flipped and saved as flipped.png.")
73
  ```
74