Spaces:
Runtime error
Runtime error
ashishabraham22
commited on
Commit
·
94d7100
1
Parent(s):
3d803a7
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import numpy as np
|
3 |
+
from ml_predict import preprocess_img,predict_defect
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
image = gr.inputs.Image(shape=(256, 256))
|
8 |
+
label = gr.outputs.Label(num_top_classes=3)
|
9 |
+
|
10 |
+
gr.Interface(fn=predict_defect, inputs=image, outputs=label, theme='peach',examples=[["images\Cr2.bmp"], ["images\Pa2.bmp"], ["images\scratch1.bmp"], ["images\Pit2.bmp"]]).launch()
|