Replicate the app from the image.
To upload files, please first save the app
import streamlit as st
import pandas as pd
from datetime import datetime
import os
# Set page config with dark theme
st.set_page_config(
page_title="Healthcare Call Analyzer",
layout="wide",
initial_sidebar_state="expanded"
)
# Custom CSS for dark theme and styling
st.markdown("""
<style>
.main {
background-color: #1E1E1E;
color: white;
}
.stSelectbox {
background-color: #2E2E2E;
}
</style>
""", unsafe_allow_html=True)
# Title section
st.title("Healthcare Call Analyzer")
st.write("Upload an MP3/WAV file to transcribe, summarize, and analyze healthcare call using AI.")
# Sidebar user selection
with st.sidebar:
st.markdown("### Welcome, User!")
selected_user = st.selectbox("Select Role", ["admin"], key="user_select")
# Main content area
col1, col2 = st.columns([1, 2])
with col1:
st.markdown("### Upload File")
uploaded_file = st.file_uploader("Choose an MP3/WAV file", type=['mp3', 'wav'])
if uploaded_file:
st.markdown("### File Info")
file_details = {
"FileName": uploaded_file.name,
"FileType": uploaded_file.type,
"FileSize": f"{uploaded_file.size / 1024:.2f} KB"
}
for key, value in file_details.items():
st.write(f"{key}: {value}")
if st.button("Process Audio"):
st.success("Processing initiated...")
with col2:
st.markdown("### Upload & Process")
st.write("Upload audio to process above. Processing results will show in Status & Results below after analyzing.")
st.markdown("### Status & Results")
# Simulated status updates
st.code("""
2023-05-20 11:15:43.871 - INFO - Watching directory /app/audio_input
with max 8 concurrent files
2023-05-20 11:15:43.871 - INFO - Starting Healthcare call analyzer with
No watcher
""")
st.markdown("### Full Logs")
# Example logs
st.text_area("Logs", value="Log list here...", height=100, disabled=True)
# Footer
st.markdown("---")
st.markdown("Healthcare Call Analyzer v1.0")
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?