Spaces:
Runtime error
Runtime error
Update new_app.py
Browse files23 unmodified lines242526272829303132333435363738394039 unmodified lines8081828384858619 unmodified lines10610710810911011111223 unmodified lines# compile=False skips optimizer/state rebuild, which saves timereturn keras.models.load_model("0.0008-0.92.keras", compile=False)st.markdown("""<style>.block-container {padding-top: 1rem;padding-bottom: 0rem;padding-left: 5rem;padding-right: 5rem;}</style>""", unsafe_allow_html=True)#titlecol1, col2 = st.columns(2)39 unmodified linesexcept Exception as e:st.info(f"Couldn’t fetch default tile: {e}")col1, col2, col3 = st.columns(3)with col3:#header19 unmodified linesst.error(f"Error fetching image: {e}")if state.img is not None:st.image(state.img, use_container_width = True)with col1:st.subheader("Prediction")23 unmodified lines242526272829303132333435363738394041424344454647484939 unmodified lines8990919293949519 unmodified lines11511611711811912012123 unmodified lines# compile=False skips optimizer/state rebuild, which saves timereturn keras.models.load_model("0.0008-0.92.keras", compile=False)st.markdown("""<style>.block-container {/* give the header breathing room so it doesn't look clipped */padding-top: 2.2rem; /* was 1rem */padding-bottom: 0rem; padding-left: 5rem; padding-right: 5rem;}/* tighten the horizontal rule spacing (bring it closer to the header) */hr {margin-top: 0.25cm; /* ~2.5mm closer than default */margin-bottom: 0.25cm;}/* center images if you ever use a fixed width instead of use_container_width */.stImage img {display: block;margin-left: auto;margin-right: auto;}</style>""", unsafe_allow_html=True)#titlecol1, col2 = st.columns(2)39 unmodified linesexcept Exception as e:st.info(f"Couldn’t fetch default tile: {e}")col1, col2, col3 = st.columns([0.8, 1.8, 1.0]) # adjust ratios to tastewith col3:#header19 unmodified linesst.error(f"Error fetching image: {e}")if state.img is not None:st.image(state.img, width=640) #use_container_width = Truewith col1:st.subheader("Prediction")
new_app.py+21-12