File size: 351 Bytes
ed67c6b
 
 
 
 
 
 
 
47e4f81
1
2
3
4
5
6
7
8
9
import gradio as gr
def gem_indentify(image):
  img=image.reshape(-1,30,30,3)
  pred=cnn.predict(img)[0]
  return {classes[i]: float(pred[i]) for i in range(43)}
  
image = gr.inputs.Image(shape=(30,30))
label = gr.outputs.Label(num_top_classes=7)
gr.Interface(fn=gem_indentify, inputs=image, outputs=label,interpretation='default').launch(share=True)