Mahrukhh commited on
Commit
d7667c0
Β·
verified Β·
1 Parent(s): 3e6c5c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -7
app.py CHANGED
@@ -46,27 +46,69 @@ def summarize_audio(audio_path):
46
  # 🎨 Streamlit UI
47
  st.set_page_config(page_title="πŸŽ™οΈ English Audio Summarizer", page_icon="😻", layout="wide")
48
 
49
- # Custom CSS
50
  st.markdown("""
51
  <style>
 
52
  .stApp {
53
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
54
  color: white;
 
55
  }
56
- .stTextArea, .stTextInput, .stFileUploader, .stAudio {
57
- border-radius: 12px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  }
 
59
  .stSuccess, .stInfo {
60
- background-color: rgba(255, 255, 255, 0.1);
61
  color: white !important;
62
- border-radius: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
  </style>
65
  """, unsafe_allow_html=True)
66
 
67
  # Header
68
- st.title("πŸ˜»πŸŽ™οΈ English Audio Summarizer")
69
- st.markdown("Upload an English audio file and let the app **transcribe**, **summarize**, and **read the summary aloud**.")
70
 
71
  # File uploader
72
  uploaded_file = st.file_uploader("πŸ“‚ Upload Audio File (MP3/WAV/OPUS)", type=["mp3", "wav", "opus"])
 
46
  # 🎨 Streamlit UI
47
  st.set_page_config(page_title="πŸŽ™οΈ English Audio Summarizer", page_icon="😻", layout="wide")
48
 
49
+ # Custom CSS for Beautiful UI
50
  st.markdown("""
51
  <style>
52
+ /* Background Gradient */
53
  .stApp {
54
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
55
  color: white;
56
+ font-family: 'Segoe UI', sans-serif;
57
  }
58
+
59
+ /* Centered Header */
60
+ .main-title {
61
+ text-align: center;
62
+ font-size: 2.8rem;
63
+ font-weight: bold;
64
+ margin-bottom: 1rem;
65
+ color: #fff;
66
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
67
+ }
68
+
69
+ .subtitle {
70
+ text-align: center;
71
+ font-size: 1.2rem;
72
+ margin-bottom: 2rem;
73
+ color: #f1f1f1;
74
+ }
75
+
76
+ /* Card Style */
77
+ .stTextArea, .stTextInput, .stFileUploader, .stAudio, .stDownloadButton button {
78
+ border-radius: 15px !important;
79
+ background: rgba(255, 255, 255, 0.15) !important;
80
+ color: white !important;
81
+ padding: 10px;
82
  }
83
+
84
  .stSuccess, .stInfo {
85
+ background-color: rgba(0, 0, 0, 0.25);
86
  color: white !important;
87
+ border-radius: 15px;
88
+ padding: 10px;
89
+ }
90
+
91
+ /* Buttons */
92
+ .stDownloadButton button, .stButton button {
93
+ background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%) !important;
94
+ color: white !important;
95
+ border: none !important;
96
+ border-radius: 12px !important;
97
+ font-weight: bold;
98
+ padding: 8px 18px;
99
+ box-shadow: 0px 4px 10px rgba(0,0,0,0.2);
100
+ transition: 0.3s;
101
+ }
102
+ .stDownloadButton button:hover, .stButton button:hover {
103
+ background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%) !important;
104
+ transform: translateY(-2px);
105
  }
106
  </style>
107
  """, unsafe_allow_html=True)
108
 
109
  # Header
110
+ st.markdown("<h1 class='main-title'>πŸ˜»πŸŽ™οΈ English Audio Summarizer</h1>", unsafe_allow_html=True)
111
+ st.markdown("<p class='subtitle'>Upload an audio file, get a transcript, summary, and listen back instantly.</p>", unsafe_allow_html=True)
112
 
113
  # File uploader
114
  uploaded_file = st.file_uploader("πŸ“‚ Upload Audio File (MP3/WAV/OPUS)", type=["mp3", "wav", "opus"])