Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -241,10 +241,11 @@ def check_load(inp_url,outp_vid,hid_box,start_f,end_f):
|
|
241 |
return out_trim,in_vid,trim_count
|
242 |
#outp_vid.change(echo_fn,outp_vid,[out_trim])
|
243 |
def process_image_1(image):
|
244 |
-
print(image)
|
245 |
-
rand_im = uuid.uuid4()
|
246 |
-
cv2.imwrite(f"{rand_im}-vid_tmp_proc.png", image)
|
247 |
-
image = f"{rand_im}-vid_tmp_proc.png"
|
|
|
248 |
out = esr.realesrgan1(img=image, model_name="realesr-general-x4v3", denoise_strength=0.5, face_enhance=False, outscale=2)
|
249 |
#out = os.path.abspath(f"{rand_im}-vid_tmp_proc.png")
|
250 |
#out_url = f'https://omnibus-vid-url-dl-mod.hf.space/file={out}'
|
|
|
241 |
return out_trim,in_vid,trim_count
|
242 |
#outp_vid.change(echo_fn,outp_vid,[out_trim])
|
243 |
def process_image_1(image):
|
244 |
+
#print(image)
|
245 |
+
#rand_im = uuid.uuid4()
|
246 |
+
#cv2.imwrite(f"{rand_im}-vid_tmp_proc.png", image)
|
247 |
+
#image = f"{rand_im}-vid_tmp_proc.png"
|
248 |
+
image=Image.open(image)
|
249 |
out = esr.realesrgan1(img=image, model_name="realesr-general-x4v3", denoise_strength=0.5, face_enhance=False, outscale=2)
|
250 |
#out = os.path.abspath(f"{rand_im}-vid_tmp_proc.png")
|
251 |
#out_url = f'https://omnibus-vid-url-dl-mod.hf.space/file={out}'
|