Spaces:
Sleeping
Sleeping
Rahul-Samedavar commited on
Commit ·
38b6081
1
Parent(s): 7d7beea
sec
Browse files
app.py
CHANGED
|
@@ -31,10 +31,12 @@ async def enhance_image(file: UploadFile = File(...)):
|
|
| 31 |
with open(input_path, "wb") as buffer:
|
| 32 |
shutil.copyfileobj(file.file, buffer)
|
| 33 |
|
|
|
|
|
|
|
| 34 |
cmd = [
|
| 35 |
"realesrgan-ncnn-vulkan",
|
| 36 |
"-i", input_path,
|
| 37 |
-
"-o",
|
| 38 |
"-s", "2",
|
| 39 |
"-m", "/opt/realesrgan/models"
|
| 40 |
]
|
|
|
|
| 31 |
with open(input_path, "wb") as buffer:
|
| 32 |
shutil.copyfileobj(file.file, buffer)
|
| 33 |
|
| 34 |
+
output_path = os.path.join(OUTPUT_DIR, f"enhanced_{input_name}")
|
| 35 |
+
|
| 36 |
cmd = [
|
| 37 |
"realesrgan-ncnn-vulkan",
|
| 38 |
"-i", input_path,
|
| 39 |
+
"-o", output_path,
|
| 40 |
"-s", "2",
|
| 41 |
"-m", "/opt/realesrgan/models"
|
| 42 |
]
|