abyildirim commited on
Commit
bfc21a8
1 Parent(s): 2264c5e

environment variables are set

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ def inference(image: np.ndarray, instruction: str, center_crop: bool):
29
  raise gr.Error("Instruction should start with 'Remove the' !")
30
  image = Image.fromarray(image)
31
  cropped_image, image = utils.preprocess_image(image, center_crop=center_crop)
32
- output_image = MODEL.inpaint(image, instruction, num_steps=os.environ["NUM_STEPS"], device="cuda", return_pil=True, seed=os.environ["SEED"])
33
  return cropped_image, output_image
34
 
35
  if __name__ == "__main__":
 
29
  raise gr.Error("Instruction should start with 'Remove the' !")
30
  image = Image.fromarray(image)
31
  cropped_image, image = utils.preprocess_image(image, center_crop=center_crop)
32
+ output_image = MODEL.inpaint(image, instruction, num_steps=int(os.environ["NUM_STEPS"]), device="cuda", return_pil=True, seed=int(os.environ["SEED"]))
33
  return cropped_image, output_image
34
 
35
  if __name__ == "__main__":