Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,10 @@ from basicsr.utils.download_util import load_file_from_url
|
|
8 |
from realesrgan import RealESRGANer
|
9 |
from realesrgan.archs.srvgg_arch import SRVGGNetCompact
|
10 |
from torchvision.transforms.functional import rgb_to_grayscale
|
11 |
-
import spaces
|
12 |
|
13 |
last_file = None
|
14 |
img_mode = "RGBA"
|
15 |
|
16 |
-
@spaces.GPU(duration=120)
|
17 |
def realesrgan(img, model_name, denoise_strength, face_enhance, outscale):
|
18 |
"""Real-ESRGAN function to restore (and upscale) images.
|
19 |
"""
|
@@ -171,12 +169,10 @@ def image_properties(img):
|
|
171 |
|
172 |
def main():
|
173 |
# Gradio Interface
|
174 |
-
with gr.Blocks(
|
175 |
|
176 |
gr.Markdown(
|
177 |
"""# <div align="center"> Ilaria Upscaler π </div>
|
178 |
-
|
179 |
-
Port of [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN).
|
180 |
"""
|
181 |
)
|
182 |
|
@@ -212,11 +208,12 @@ def main():
|
|
212 |
# Undocumented method to clear a component's value using Javascript
|
213 |
|
214 |
gr.Markdown(
|
215 |
-
"""Made with love by Ilaria π | Support me on [Ko-Fi](https://ko-fi.com/ilariaowo) |
|
|
|
216 |
"""
|
217 |
)
|
218 |
|
219 |
-
|
220 |
|
221 |
|
222 |
if __name__ == "__main__":
|
|
|
8 |
from realesrgan import RealESRGANer
|
9 |
from realesrgan.archs.srvgg_arch import SRVGGNetCompact
|
10 |
from torchvision.transforms.functional import rgb_to_grayscale
|
|
|
11 |
|
12 |
last_file = None
|
13 |
img_mode = "RGBA"
|
14 |
|
|
|
15 |
def realesrgan(img, model_name, denoise_strength, face_enhance, outscale):
|
16 |
"""Real-ESRGAN function to restore (and upscale) images.
|
17 |
"""
|
|
|
169 |
|
170 |
def main():
|
171 |
# Gradio Interface
|
172 |
+
with gr.Blocks(theme=gr.themes.Default(primary_hue="pink", secondary_hue="rose"), title="Ilaria Upscaler π") as app:
|
173 |
|
174 |
gr.Markdown(
|
175 |
"""# <div align="center"> Ilaria Upscaler π </div>
|
|
|
|
|
176 |
"""
|
177 |
)
|
178 |
|
|
|
208 |
# Undocumented method to clear a component's value using Javascript
|
209 |
|
210 |
gr.Markdown(
|
211 |
+
"""Made with love by Ilaria π | Support me on [Ko-Fi](https://ko-fi.com/ilariaowo) | Using [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN).
|
212 |
+
|
213 |
"""
|
214 |
)
|
215 |
|
216 |
+
app.launch()
|
217 |
|
218 |
|
219 |
if __name__ == "__main__":
|