gsbm commited on
Commit
1756ee0
·
verified ·
1 Parent(s): e816968

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -79,8 +79,8 @@ def generate_image(
79
  apply_refiner=apply_refiner,
80
  api_name="/run",
81
  )
82
- image_data = fix_base64_padding(result) # Fix the padding of the base64 string
83
- image_bytes = base64.b64decode(image_data)
84
  image = Image.open(BytesIO(image_bytes)) # Ensure the result is converted to a PIL Image
85
  normal_map = generate_normal_map(image)
86
  return image, normal_map
 
79
  apply_refiner=apply_refiner,
80
  api_name="/run",
81
  )
82
+ result = fix_base64_padding(result) # Fix the padding of the base64 string
83
+ image_bytes = base64.b64decode(result)
84
  image = Image.open(BytesIO(image_bytes)) # Ensure the result is converted to a PIL Image
85
  normal_map = generate_normal_map(image)
86
  return image, normal_map