Skip to content

Commit

Permalink
Update streamlit_app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yektaozan authored Jan 7, 2023
1 parent 66d7dac commit f03699f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def show_explore_page():

for img_name, img_path in img_path_dict.items():
st.write(img_name)
img = PIL.Image.open('garbage_classification/results/{model_name}{img_path}'.format(model_name=model_name, img_path=img_path)).resize((800, 600))
img = PIL.Image.open('results/{model_name}{img_path}'.format(model_name=model_name, img_path=img_path)).resize((800, 600))
st.image(img)
st.write('#'*50)

Expand Down Expand Up @@ -51,7 +51,7 @@ def prepare(img_path, model):
def show_predict_page():
st.title('Prediction Page')
model_name = st.selectbox('Select a model', ['vgg16', 'mobilenetv2'])
model = load_model("garbage_classification/models/{}.h5".format(model_name))
model = load_model("models/{}.h5".format(model_name))
uploaded_file = st.file_uploader('Choose an image...', type=['jpg', 'png', 'jpeg'])
if uploaded_file is not None:
img = PIL.Image.open(uploaded_file)
Expand Down

0 comments on commit f03699f

Please sign in to comment.