AndrewRWilliams commited on
Commit
622ff96
1 Parent(s): f2822fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -59,8 +59,17 @@ async def transcribe(file):
59
  return download
60
 
61
  with demo:
62
- audio_file = gr.File()
 
 
 
 
 
 
 
63
  transcript = gr.File(label="transcript")
64
- b1 = gr.Button("Transcrire")
65
- b1.click(transcribe, inputs=audio_file, outputs=transcript)
 
 
66
  demo.launch()
 
59
  return download
60
 
61
  with demo:
62
+ gr.Markdown("Choisir le type d'entrée: fichier audio ou fichier vidéo")
63
+ with gr.Tab("audio"):
64
+ audio_file = gr.Audio()
65
+ audio_button = gr.Button("Transcrire audio")
66
+ with gr.Tab("vidéo"):
67
+ video_file = gr.Video()
68
+ video_button = gr.Button("Transcrire vidéo")
69
+
70
  transcript = gr.File(label="transcript")
71
+
72
+ audio_button.click(transcribe, inputs=audio_file, outputs=transcript)
73
+ video_button.click(transcribe, inputs=video_file, outputs=transcript)
74
+
75
  demo.launch()