Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
•
8f2e8f4
1
Parent(s):
48d2175
Update app.py
Browse files
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
|
46 |
else:
|
47 |
-
os.system("python inference_realesrgan.py
|
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 |
|