Phips commited on
Commit
9c65a97
1 Parent(s): 179f2b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,5 +1,11 @@
1
  # Code taken and adopted from https://huggingface.co/spaces/havas79/Real-ESRGAN_Demo/blob/main/app.py - credit where credit is due.
2
 
 
 
 
 
 
 
3
  import gradio as gr
4
  import cv2
5
  import numpy
@@ -62,7 +68,7 @@ def upscale(img):
62
  tile_pad=10,
63
  pre_pad=10,
64
  half=False,
65
- gpu_id=None,
66
  )
67
 
68
  # Convert the input PIL image to cv2 image, so that it can be processed by realesrgan
 
1
  # Code taken and adopted from https://huggingface.co/spaces/havas79/Real-ESRGAN_Demo/blob/main/app.py - credit where credit is due.
2
 
3
+ import torch
4
+ print(f"Is CUDA available: {torch.cuda.is_available()}")
5
+ # True
6
+ print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
7
+ # Tesla T4
8
+
9
  import gradio as gr
10
  import cv2
11
  import numpy
 
68
  tile_pad=10,
69
  pre_pad=10,
70
  half=False,
71
+ gpu_id=0,
72
  )
73
 
74
  # Convert the input PIL image to cv2 image, so that it can be processed by realesrgan