reedmayhew commited on
Commit
5e534b3
·
verified ·
1 Parent(s): 29356cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  # Import necessary libraries
2
  from PIL import Image
3
- import torch
4
  import numpy as np
 
5
  from transformers import AutoImageProcessor, Swin2SRForImageSuperResolution
6
  import gradio as gr # Import Gradio for creating the interface
7
 
@@ -35,7 +35,6 @@ def main(image, save_as_jpg=True):
35
  # Check if GPU is available and set the device accordingly
36
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
37
 
38
- regular_model = "caidas/swin2SR-classical-sr-x4-64"
39
  realworld_model = "caidas/swin2SR-realworld-sr-x4-64-bsrgan-psnr"
40
 
41
  # Load the Swin2SR model and processor for 4x upscaling
 
1
  # Import necessary libraries
2
  from PIL import Image
 
3
  import numpy as np
4
+ import torch
5
  from transformers import AutoImageProcessor, Swin2SRForImageSuperResolution
6
  import gradio as gr # Import Gradio for creating the interface
7
 
 
35
  # Check if GPU is available and set the device accordingly
36
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
37
 
 
38
  realworld_model = "caidas/swin2SR-realworld-sr-x4-64-bsrgan-psnr"
39
 
40
  # Load the Swin2SR model and processor for 4x upscaling