import streamlit as st from PIL import Image from predictions import get_predictions def main(): st.title("AI-Powered Audio Assistant") # Sidebar for uploading image st.sidebar.title("Upload Image") uploaded_image = st.sidebar.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"]) if uploaded_image is not None: # Get predictions processed_image, text, audio = get_predictions(uploaded_image) # Display processed image with bounding boxes st.image(processed_image, caption="Output image with predicted instances", use_column_width=True) # Play generated audio st.audio(audio, format="audio/wav") if __name__ == "__main__": main()