Spaces:
Sleeping
Sleeping
Update app.py
Browse files45 unmodified lines4647484950515253545556575859606162636465666745 unmodified linesif model_name == "4xGRL":weight_path = "pretrained/4x_APISR_GRL_GAN_generator.pth"auto_download_if_needed(weight_path)generator = load_grl(weight_path, scale=4, device='cpu')elif model_name == "4xRRDB":weight_path = "pretrained/4x_APISR_RRDB_GAN_generator.pth"auto_download_if_needed(weight_path)generator = load_rrdb(weight_path, scale=4, device='cpu')elif model_name == "2xRRDB":weight_path = "pretrained/2x_APISR_RRDB_GAN_generator.pth"auto_download_if_needed(weight_path)generator = load_rrdb(weight_path, scale=2, device='cpu')elif model_name == "4xDAT":weight_path = "pretrained/4x_APISR_DAT_GAN_generator.pth"auto_download_if_needed(weight_path)generator = load_dat(weight_path, scale=4, device='cpu')else:raise gr.Error("We don't support such Model")45 unmodified lines464748495051525354555657585960616263646566676869707145 unmodified linesif model_name == "4xGRL":weight_path = "pretrained/4x_APISR_GRL_GAN_generator.pth"auto_download_if_needed(weight_path)generator = load_grl(weight_path, scale=4)generator = generator.to(device='cpu')elif model_name == "4xRRDB":weight_path = "pretrained/4x_APISR_RRDB_GAN_generator.pth"auto_download_if_needed(weight_path)generator = load_rrdb(weight_path, scale=4)generator = generator.to(device='cpu')elif model_name == "2xRRDB":weight_path = "pretrained/2x_APISR_RRDB_GAN_generator.pth"auto_download_if_needed(weight_path)generator = load_rrdb(weight_path, scale=2)generator = generator.to(device='cpu')elif model_name == "4xDAT":weight_path = "pretrained/4x_APISR_DAT_GAN_generator.pth"auto_download_if_needed(weight_path)generator = load_dat(weight_path, scale=4)generator = generator.to(device='cpu')else:raise gr.Error("We don't support such Model")
app.py+8-4