To upload files, please first save the app
import altair as alt
import streamlit as st
from PIL import Image
from pathlib import Path
import base64
import io
import pandas as pd
import zipfile
import filetype
st.set_page_config(page_title='Br Classifier', page_icon = 'nm.jpg', layout = 'wide',
initial_sidebar_state = 'expanded')
st.markdown("""
#CLASSIFICATION
This application helps to classify different classes
***
""")
# pylint: enable=line-too-long
from typing import Dict
import streamlit as st
def main():
"""Run this function to run the app"""
st.info(__doc__)
file_uploaded = st.file_uploader("Upload", type=["png","jpg","jpeg", "zip"],
accept_multiple_files=True)
if file_uploaded:
# Ensure the file is a zip file and handle the uploaded files correctly
if isinstance(file_uploaded, list):
for uploaded_file in file_uploaded:
if uploaded_file.type == "application/zip":
with zipfile.ZipFile(uploaded_file, "r") as z:
z.extractall(".")
else:
st.warning("Please upload a zip file.")
else:
st.warning("Please upload multiple files as a list.")
selected_model = st.sidebar.selectbox(
'Pick an image classifier model',
('CNN_CLASSIFIER', 'Neural Network'))
st.write('You selected:', selected_model)
main()
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?