Dvjc1899 commited on
Commit
3243b25
·
1 Parent(s): a87b5fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -2,13 +2,17 @@ import tensorflow as tf
2
 
3
  import math
4
  import numpy as np
 
 
 
5
 
6
  from huggingface_hub import from_pretrained_keras
7
  import gradio as gr
8
 
9
  model = from_pretrained_keras("Dvjc1899/super-resolution")
10
 
11
- def infer(img):
 
12
  img = img.resize((300, 300))
13
  ycbcr = img.convert("YCbCr")
14
  y, cb, cr = ycbcr.split()
 
2
 
3
  import math
4
  import numpy as np
5
+ from PIL import Image
6
+
7
+
8
 
9
  from huggingface_hub import from_pretrained_keras
10
  import gradio as gr
11
 
12
  model = from_pretrained_keras("Dvjc1899/super-resolution")
13
 
14
+ def infer(image):
15
+ img = Image.fromarray(image)
16
  img = img.resize((300, 300))
17
  ycbcr = img.convert("YCbCr")
18
  y, cb, cr = ycbcr.split()