Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|
|
|
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()
|