nisharg nargund commited on
Commit
16ea20c
·
1 Parent(s): 926f5af

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import os
3
+
4
+ # Load the model
5
+ model = keras.models.load_model("./model.h5")
6
+
7
+ # Create a function to make predictions
8
+ def predict(image):
9
+ prediction = model.predict(image)
10
+ return prediction
11
+
12
+ # Create a Streamlit app
13
+ st.title("Bone Fracture Detection")
14
+
15
+ # Upload an image
16
+ image = st.file_uploader("Upload an image of a bone fracture")
17
+
18
+ # If an image is uploaded, make a prediction
19
+ if image is not None:
20
+ image = image.read()
21
+ prediction = predict(image)
22
+ st.write("The prediction is:", prediction)
23
+