Spaces:
Running
Running
Ahsen Khaliq
commited on
Commit
·
3b50370
1
Parent(s):
f7fbf23
Update app.py
Browse files
app.py
CHANGED
@@ -41,9 +41,9 @@ def inference(img,mode):
|
|
41 |
img = img.resize((basewidth,hsize), Image.ANTIALIAS)
|
42 |
img.save(INPUT_DIR + "1.jpg", "JPEG")
|
43 |
if mode == "base":
|
44 |
-
run_cmd("python inference_realesrgan.py --
|
45 |
else:
|
46 |
-
os.system("python inference_realesrgan.py --
|
47 |
return os.path.join(OUTPUT_DIR, "1_out.jpg")
|
48 |
|
49 |
|
|
|
41 |
img = img.resize((basewidth,hsize), Image.ANTIALIAS)
|
42 |
img.save(INPUT_DIR + "1.jpg", "JPEG")
|
43 |
if mode == "base":
|
44 |
+
run_cmd("python inference_realesrgan.py --model_name RealESRGAN_x4plus.pth --input "+ INPUT_DIR + " --output " + OUTPUT_DIR + " --netscale 4 --outscale 4")
|
45 |
else:
|
46 |
+
os.system("python inference_realesrgan.py --model_name RealESRGAN_x4plus_anime_6B.pth --input "+ INPUT_DIR + " --output " + OUTPUT_DIR)
|
47 |
return os.path.join(OUTPUT_DIR, "1_out.jpg")
|
48 |
|
49 |
|