Spaces:
Runtime error
Runtime error
added PIL import
Browse files
app.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
from huggingface_hub import from_pretrained_keras
|
2 |
import gradio as gr
|
|
|
3 |
import tensorflow as tf
|
4 |
import numpy as np
|
5 |
import os
|
6 |
|
7 |
# load model
|
8 |
-
model = tf.keras.models.load_model('keras-io/semantic-segmentation
|
9 |
|
10 |
# gradio components
|
11 |
inputs = gr.inputs.Image()
|
|
|
1 |
from huggingface_hub import from_pretrained_keras
|
2 |
import gradio as gr
|
3 |
+
from PIL import Image
|
4 |
import tensorflow as tf
|
5 |
import numpy as np
|
6 |
import os
|
7 |
|
8 |
# load model
|
9 |
+
model = tf.keras.models.load_model('./tf_model.h5') # from keras-io/semantic-segmentation
|
10 |
|
11 |
# gradio components
|
12 |
inputs = gr.inputs.Image()
|