Spaces:
Runtime error
Runtime error
app.py file (in progress)
Browse files
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|
| 12 |
+
outputs = gr.outputs.Image()
|
| 13 |
+
|
| 14 |
+
# inference fn
|
| 15 |
+
def predict(image_input):
|
| 16 |
+
pass
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
gr.Interface(predict, inputs = inputs, outputs = outputs)
|