Spaces:
Runtime error
Runtime error
import streamlit as st | |
import os | |
# Load the model | |
model = keras.models.load_model("./model.h5") | |
# Create a function to make predictions | |
def predict(image): | |
prediction = model.predict(image) | |
return prediction | |
# Create a Streamlit app | |
st.title("Bone Fracture Detection") | |
# Upload an image | |
image = st.file_uploader("Upload an image of a bone fracture") | |
# If an image is uploaded, make a prediction | |
if image is not None: | |
image = image.read() | |
prediction = predict(image) | |
st.write("The prediction is:", prediction) | |