File size: 396 Bytes
34ccbbc
 
 
5fef537
34ccbbc
df45c31
34ccbbc
df45c31
 
 
34ccbbc
 
df45c31
 
34ccbbc
4496144
34ccbbc
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr
import numpy as np
import pandas as pd
from tensorflow import keras

model = keras.models.load_model('model.h5')

def analyse(image):
  data = image.reshape((1, 128, 128, 3))
  return model.predict(data)

iface = gr.Interface(
    analyse,
    gr.inputs.Image(shape=(128,128)),
    "text",
    examples=['non.jpg', 'moderate.jpg', 'mild.jpg', 'verymild.jpg'],
)
iface.launch()