sergiolucero commited on
Commit
4c067ae
1 Parent(s): 6e9d64b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -1,11 +1,9 @@
1
  import gradio as gr
2
  from pydub import AudioSegment
3
  from ailib import whisper_transcribe, summarize, nueva_ficha
4
- import pandas as pd
5
 
6
  def transcribe(audiofile):
7
- #audio = AudioSegment.from_file(audiofile)
8
- #open(filename, 'wb').write(audio)
9
  consulta = whisper_transcribe(audiofile)
10
  resumen_consulta = summarize(consulta)
11
  resumen_historial = open('resumen.txt').read()
@@ -29,10 +27,9 @@ gr.Markdown("**Demo CORFO**")
29
 
30
  with gr.Blocks() as demo:
31
  with gr.Row():
32
- audemo = gr.Interface(
33
- transcribe,
34
  gr.Audio(sources=["microphone"], type="filepath"),
35
- ["text","text","text"] # was simply "text",
36
  )
37
  with gr.Row():
38
  with gr.Column(scale=1):
 
1
  import gradio as gr
2
  from pydub import AudioSegment
3
  from ailib import whisper_transcribe, summarize, nueva_ficha
4
+ import pandas as pd # only for patient list loading
5
 
6
  def transcribe(audiofile):
 
 
7
  consulta = whisper_transcribe(audiofile)
8
  resumen_consulta = summarize(consulta)
9
  resumen_historial = open('resumen.txt').read()
 
27
 
28
  with gr.Blocks() as demo:
29
  with gr.Row():
30
+ audemo = gr.Interface(transcribe,
 
31
  gr.Audio(sources=["microphone"], type="filepath"),
32
+ ["text","text","text"]
33
  )
34
  with gr.Row():
35
  with gr.Column(scale=1):