crossdevlogix commited on
Commit
2a36a0a
·
verified ·
1 Parent(s): bb6220c

Upload 6 files

Browse files
Files changed (6) hide show
  1. Liver_model.h5 +3 -0
  2. Test1.jpg +0 -0
  3. Test2.jpeg +0 -0
  4. Test3.jpeg +0 -0
  5. app.py +27 -0
  6. requirements.txt +3 -0
Liver_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f6e5ec33701c39f01880a39cc234b91f7d65c5655225513dcf8df4cc312a055
3
+ size 234256912
Test1.jpg ADDED
Test2.jpeg ADDED
Test3.jpeg ADDED
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import cv2
3
+ from keras.models import load_model
4
+
5
+ my_model=load_model('Liver_model.h5',compile=True)
6
+ class_num={0:'Healthy',1:'Un-Healthy'}
7
+
8
+ def Predict(Image):
9
+ Image=cv2.resize(Image,(224,224))
10
+ class_no=my_model.predict(Image.reshape(1,224,224,3)).argmax()
11
+ class_name=class_num.get(class_no)
12
+ return class_name
13
+
14
+
15
+ interface=gr.Interface(fn=Predict,inputs='image',outputs=[gr.components.Textbox(label="Class Name")],
16
+ title="This Space predict the liver of Chicken is healthy or un-healthy",
17
+ examples=[['Test1.jpg'],['Test2.jpeg'],['Test3.jpeg']])
18
+ interface.launch(debug=True)
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ tensorflow==2.12.0
2
+ keras
3
+ opencv-python