Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import os
|
2 |
-
os.system("pip install git+https://huggingface.co/spaces/Omnibus/real_esrgan_mod")
|
3 |
import gradio as gr
|
4 |
import yt_dlp
|
5 |
import json
|
@@ -10,7 +9,7 @@ import moviepy
|
|
10 |
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
|
11 |
import moviepy.video.io.ImageSequenceClip
|
12 |
from moviepy.editor import *
|
13 |
-
|
14 |
uid=uuid.uuid4()
|
15 |
if not os.path.exists(f'{uid}'): os.makedirs(f'{uid}')
|
16 |
if not os.path.exists(f'{uid}-frames'): os.makedirs(f'{uid}-frames')
|
@@ -242,7 +241,7 @@ def check_load(inp_url,outp_vid,hid_box,start_f,end_f):
|
|
242 |
#outp_vid.change(echo_fn,outp_vid,[out_trim])
|
243 |
def process_image_1(image):
|
244 |
#out = esr(img=image, model_name="realesr-general-x4v3", denoise_strength=0.5, face_enhance=False, outscale=2)
|
245 |
-
out = realesrgan1(image, "realesr-general-x4v3", 0.5, False, 2)
|
246 |
print (out)
|
247 |
out = Image.open(out)
|
248 |
return out
|
|
|
1 |
import os
|
|
|
2 |
import gradio as gr
|
3 |
import yt_dlp
|
4 |
import json
|
|
|
9 |
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
|
10 |
import moviepy.video.io.ImageSequenceClip
|
11 |
from moviepy.editor import *
|
12 |
+
import esr
|
13 |
uid=uuid.uuid4()
|
14 |
if not os.path.exists(f'{uid}'): os.makedirs(f'{uid}')
|
15 |
if not os.path.exists(f'{uid}-frames'): os.makedirs(f'{uid}-frames')
|
|
|
241 |
#outp_vid.change(echo_fn,outp_vid,[out_trim])
|
242 |
def process_image_1(image):
|
243 |
#out = esr(img=image, model_name="realesr-general-x4v3", denoise_strength=0.5, face_enhance=False, outscale=2)
|
244 |
+
out = esr.realesrgan1(image, "realesr-general-x4v3", 0.5, False, 2)
|
245 |
print (out)
|
246 |
out = Image.open(out)
|
247 |
return out
|