tensorkelechi commited on
Commit
16a9748
·
verified ·
1 Parent(s): 2285607

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -8
app.py CHANGED
@@ -20,8 +20,9 @@ st.set_page_config(
20
  page_title="VidText"
21
  )
22
 
23
- st.title("VidText-whisper")
24
- st.subheader("A video/audio transcription app")
 
25
 
26
  def youtube_video_downloader(url):
27
  yt_vid = YouTube(url)
@@ -90,15 +91,22 @@ with youtube_url_tab:
90
  st.success(f"Transcription successful")
91
  st.write(f'Video title: {title}')
92
  st.write('___')
93
- st.write(ytvideo_transcript)
94
- # st.write(f'Completed in {run_time}')
 
 
 
 
 
95
 
96
  if st.button("Generate Summary"):
97
  summary = generate_ai_summary(ytvideo_transcript)
98
  st.write(summary)
 
99
  except Exception as e:
100
  st.error(e)
101
 
 
102
  # Video file transcription
103
 
104
  with file_select_tab:
@@ -113,7 +121,12 @@ with file_select_tab:
113
 
114
  video_transcript = transcriber_pass(audio)
115
  st.success(f"Transcription successful")
116
- st.write(video_transcript)
 
 
 
 
 
117
 
118
  if st.button("Generate Summary", key="ti2"):
119
  summary = generate_ai_summary(video_transcript)
@@ -134,8 +147,13 @@ with audio_file_tab:
134
  processed_audio = audio_processing(audio_file)
135
  audio_transcript = transcriber_pass(processed_audio)
136
  st.success(f"Transcription successful")
137
- st.write(audio_transcript)
138
-
 
 
 
 
 
139
 
140
  if st.button("Generate Summary", key="ti1"):
141
  summary = generate_ai_summary(audio_transcript)
@@ -143,4 +161,19 @@ with audio_file_tab:
143
 
144
  except Exception as e:
145
  st.error(e)
146
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  page_title="VidText"
21
  )
22
 
23
+ st.title('VIdtext_whisper')
24
+ st.header('A web app for video/audio transcription(Youtube, mp4, mp3)')
25
+
26
 
27
  def youtube_video_downloader(url):
28
  yt_vid = YouTube(url)
 
91
  st.success(f"Transcription successful")
92
  st.write(f'Video title: {title}')
93
  st.write('___')
94
+ # st.write(ytvideo_transcript)
95
+ st.markdown(f'''
96
+ <div style="background-color: black; color: white; font-weight: bold; padding: 1rem; border-radius: 10px;">
97
+ <p> -> {ytvideo_transcript}</p>
98
+ </div>
99
+ ''',
100
+ unsafe_allow_html=True)
101
 
102
  if st.button("Generate Summary"):
103
  summary = generate_ai_summary(ytvideo_transcript)
104
  st.write(summary)
105
+
106
  except Exception as e:
107
  st.error(e)
108
 
109
+
110
  # Video file transcription
111
 
112
  with file_select_tab:
 
121
 
122
  video_transcript = transcriber_pass(audio)
123
  st.success(f"Transcription successful")
124
+ st.markdown(f'''
125
+ <div style="background-color: black; color: white; font-weight: bold; padding: 1rem; border-radius: 10px;">
126
+ <p> -> {video_transcript}</p>
127
+ </div>
128
+ ''',
129
+ unsafe_allow_html=True)
130
 
131
  if st.button("Generate Summary", key="ti2"):
132
  summary = generate_ai_summary(video_transcript)
 
147
  processed_audio = audio_processing(audio_file)
148
  audio_transcript = transcriber_pass(processed_audio)
149
  st.success(f"Transcription successful")
150
+ # st.write(audio_transcript)
151
+ st.markdown(f'''
152
+ <div style="background-color: black; color: white; font-weight: bold; padding: 1rem; border-radius: 10px;">
153
+ <p> -> {audio_transcript}</p>
154
+ </div>
155
+ ''',
156
+ unsafe_allow_html=True)
157
 
158
  if st.button("Generate Summary", key="ti1"):
159
  summary = generate_ai_summary(audio_transcript)
 
161
 
162
  except Exception as e:
163
  st.error(e)
164
+
165
+
166
+ # Footer
167
+ st.write('')
168
+ st.write('')
169
+ st.write('')
170
+
171
+ st.markdown("""
172
+ <div style="text-align: center; padding: 1rem;">
173
+ Project by <a href="https://github.com/kelechi-c" target="_blank" style="color: white; font-weight: bold; text-decoration: none;">
174
+ tensor_kelechi</a>
175
+ </div>
176
+ """,
177
+ unsafe_allow_html=True)
178
+
179
+ # Arigato :)