AndrewRWilliams commited on
Commit
4a2cf48
1 Parent(s): 53f5340

more basename changes

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -18,13 +18,13 @@ def transcribe(file):
18
  write_srt(result["segments"], file=srt)
19
 
20
  download = []
21
- download.append(str(file) + "-subs.srt");
22
- download.append(str(file) + "-transcript.txt");
23
 
24
  return download
25
 
26
  iface = gr.Interface(
27
- title = 'Whisper transcription and subtitles from file',
28
  fn=transcribe,
29
  inputs=[
30
  gr.inputs.Audio(source="upload", type="filepath", label="Upload Audio")
 
18
  write_srt(result["segments"], file=srt)
19
 
20
  download = []
21
+ download.append(os.path.basename(file) + "-subs.srt");
22
+ download.append(os.path.basename(file) + "-transcript.txt");
23
 
24
  return download
25
 
26
  iface = gr.Interface(
27
+ title = 'Whisper transcription and subtitles from file.',
28
  fn=transcribe,
29
  inputs=[
30
  gr.inputs.Audio(source="upload", type="filepath", label="Upload Audio")