Spaces:
Build error
Build error
Update app.py
Browse files286 unmodified lines28728828929029129229365 unmodified lines359360361362363364286 unmodified lines# ----- CUDA / precision / tiling -----use_cuda = Falsetry:use_cuda = hasattr(cv2, "cuda") and cv2.cuda.getCudaEnabledDeviceCount() > 0except Exception:use_cuda = Falsegpu_id = 0 if use_cuda else None65 unmodified lineslabel = f"<div style='font-size:12px;opacity:.8;margin-top:4px;'>{text} {pct:.1f}%</div>"return bar + labeldef batch_realesrgan(files: list, # from gr.Files (type='filepath')model_name: str,286 unmodified lines28728828929029129229329465 unmodified lines360361362363364365366286 unmodified lines# ----- CUDA / precision / tiling -----use_cuda = Falsetry:import torchuse_cuda = torch.cuda.is_available()except Exception:use_cuda = Falsegpu_id = 0 if use_cuda else None65 unmodified lineslabel = f"<div style='font-size:12px;opacity:.8;margin-top:4px;'>{text} {pct:.1f}%</div>"return bar + label@GPU()def batch_realesrgan(files: list, # from gr.Files (type='filepath')model_name: str,
app.py+3-1