Ahsen Khaliq commited on
Commit
8f2e8f4
1 Parent(s): 48d2175

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,9 +42,9 @@ def inference(img,mode):
42
  img = img.resize((basewidth,hsize), Image.ANTIALIAS)
43
  img.save(INPUT_DIR + "1.jpg", "JPEG")
44
  if mode == "base":
45
- run_cmd("python inference_realesrgan.py --model_path RealESRGAN_x4plus.pth --input "+ INPUT_DIR + " --output " + OUTPUT_DIR + " --netscale 4 --outscale 4")
46
  else:
47
- os.system("python inference_realesrgan.py --model_path RealESRGAN_x4plus_anime_6B.pth --input "+ INPUT_DIR + " --output " + OUTPUT_DIR)
48
  return os.path.join(OUTPUT_DIR, "1_out.jpg")
49
 
50
 
 
42
  img = img.resize((basewidth,hsize), Image.ANTIALIAS)
43
  img.save(INPUT_DIR + "1.jpg", "JPEG")
44
  if mode == "base":
45
+ run_cmd("python inference_realesrgan.py -n RealESRGAN_x4plus -i "+ INPUT_DIR + " -o " + OUTPUT_DIR)
46
  else:
47
+ os.system("python inference_realesrgan.py -n RealESRGAN_x4plus_anime_6B -i "+ INPUT_DIR + " -o " + OUTPUT_DIR)
48
  return os.path.join(OUTPUT_DIR, "1_out.jpg")
49
 
50