Update app.py
Browse files
app.py
CHANGED
|
@@ -31,6 +31,7 @@ from basicsr.utils.download_util import load_file_from_url
|
|
| 31 |
from realesrgan import RealESRGANer
|
| 32 |
from realesrgan.archs.srvgg_arch import SRVGGNetCompact
|
| 33 |
|
|
|
|
| 34 |
def try_load_logo_b64() -> str:
|
| 35 |
try:
|
| 36 |
with open("bifrost_logo.png", "rb") as f:
|
|
@@ -228,6 +229,7 @@ def step2_process_next_batch(
|
|
| 228 |
zip_file = _save_zip_of_dir(out_dir, Path(out_dir.parent) / "upscaled.zip")
|
| 229 |
yield gallery, zip_file, f"Processed batch of {total_in_batch}. {next_idx}/{up_total} done.", render_progress(pct_global, "Upscaling… (global)"), next_idx, up_out_dir
|
| 230 |
|
|
|
|
| 231 |
def build_ui():
|
| 232 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 233 |
gr.HTML(render_logo_html(88))
|
|
|
|
| 31 |
from realesrgan import RealESRGANer
|
| 32 |
from realesrgan.archs.srvgg_arch import SRVGGNetCompact
|
| 33 |
|
| 34 |
+
@spaces.GPU
|
| 35 |
def try_load_logo_b64() -> str:
|
| 36 |
try:
|
| 37 |
with open("bifrost_logo.png", "rb") as f:
|
|
|
|
| 229 |
zip_file = _save_zip_of_dir(out_dir, Path(out_dir.parent) / "upscaled.zip")
|
| 230 |
yield gallery, zip_file, f"Processed batch of {total_in_batch}. {next_idx}/{up_total} done.", render_progress(pct_global, "Upscaling… (global)"), next_idx, up_out_dir
|
| 231 |
|
| 232 |
+
@spaces.GPU
|
| 233 |
def build_ui():
|
| 234 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 235 |
gr.HTML(render_logo_html(88))
|