Spaces:
Sleeping
Sleeping
Update app.py
Browse files18 unmodified lines192021222324252627282930313233343536373839404142434445464748495051525354555657585959 unmodified lines119120121122123124125193 unmodified lines31932032118 unmodified linesst.title('Polymersomes Detection from TEM Images')# Sidebar Messagest.sidebar.markdown("""### βΉοΈ About This AppThis is the **first version - March 2025** of DetectNano: an AI-powered tool for the automated detection of polymer nanostructures in TEM images.β‘οΈ Try it now on polymersomes as proof of conceptβ **License:**CC-BY-NC 4.0β **Disclaimer:**Due to the **limited and specific dataset used during training**, some detection errors may occur.A **more robust version** with improved accuracy and extended capabilities will be released **in the near future**.** Future Developments:**Follow our roadmap and updates on GitHub:π [GitHub Repository](https://github.com/ChemDoc/DetectNano)π **Citation:****Zenodo DOI:** [https://doi.org/10.5281/zenodo.14995364](https://doi.org/10.5281/zenodo.14995364)""")st.sidebar.write('Upload a TEM image to detect vesicles.')uploaded_file = st.sidebar.file_uploader("Choose an image...", type=["jpg", "png", "jpeg", "tif"])button_container = st.sidebar.empty()run_button = button_container.button('π Run Detection',key='run_button',help='Click to run detection',disabled=True)# Add sliders to adjust parameters and a button to reset them59 unmodified lines# Extract the original image name without extensionimage_name = os.path.splitext(uploaded_file.name)[0]run_button_disabled = Falseif run_button:193 unmodified linesexcept Exception as e:st.error(f"β Invalid image, {str(e)}")18 unmodified lines192021222324252627282930313233343559 unmodified lines9596979899100193 unmodified lines29429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332418 unmodified linesst.title('Polymersomes Detection from TEM Images')st.sidebar.write('Upload a TEM image to detect vesicles.')uploaded_file = st.sidebar.file_uploader("Choose an image...", type=["jpg", "png", "jpeg", "tif"])button_container = st.sidebar.empty()run_button = button_container.button('π Run Detection',key='run_button',help='Click to run detection',disabled=False)# Add sliders to adjust parameters and a button to reset them59 unmodified lines# Extract the original image name without extensionimage_name = os.path.splitext(uploaded_file.name)[0]if run_button:193 unmodified linesexcept Exception as e:st.error(f"β Invalid image, {str(e)}")# Sidebar Message with a Boxst.sidebar.markdown("""<div style="border: 2px solid #4CAF50; /* Couleur verte */border-radius: 10px;padding: 15px;background-color: #f9f9f9;box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);"><h3 style="color: #4CAF50;">βΉοΈ About This App</h3><p>This is the <b>first version - March 2025</b> of DetectNano: an AI-powered tool for the automated detection of polymer nanostructures in TEM images.</p><p>β‘οΈ Try it now on polymersomes as proof of concept</p><p><b>β License:</b><br>CC-BY-NC 4.0</p><p><b>β Disclaimer:</b><br>Due to the <b>limited and specific dataset used during training</b>, some detection errors may occur.<br>A <b>more robust version</b> with improved accuracy and extended capabilities will be released <b>in the near future</b>.</p><p><b>π Future Developments:</b><br>Follow our roadmap and updates on GitHub:<br>π <a href="https://github.com/ChemDoc/DetectNano" target="_blank">GitHub Repository</a></p><p><b>π Citation:</b><br><b>Zenodo DOI:</b> <a href="https://doi.org/10.5281/zenodo.14995364" target="_blank">https://doi.org/10.5281/zenodo.14995364</a></p></div>""", unsafe_allow_html=True)
app.py+29-26