KG0101 commited on
Commit
9fe6673
·
verified ·
1 Parent(s): 21b58e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -93,8 +93,8 @@ def generate_soap(
93
  def transcribe_and_generate_soap(audio, task, system_prompt, max_new_tokens, temperature, top_p, top_k, repetition_penalty):
94
  # First transcribe the audio
95
  transcribed_text = transcribe(audio, task)
96
- # Then generate SOAP notes based on the transcription
97
- return generate_soap(
98
  transcribed_text,
99
  system_prompt,
100
  max_new_tokens,
@@ -102,7 +102,8 @@ def transcribe_and_generate_soap(audio, task, system_prompt, max_new_tokens, tem
102
  top_p,
103
  top_k,
104
  repetition_penalty
105
- )
 
106
 
107
  # Gradio Interface combining transcription and SOAP note generation
108
  demo = gr.Blocks(theme=gr.themes.Ocean())
 
93
  def transcribe_and_generate_soap(audio, task, system_prompt, max_new_tokens, temperature, top_p, top_k, repetition_penalty):
94
  # First transcribe the audio
95
  transcribed_text = transcribe(audio, task)
96
+ # Then generate SOAP notes based on the transcription and collect all generated text into a single string
97
+ generated_text = "".join(generate_soap(
98
  transcribed_text,
99
  system_prompt,
100
  max_new_tokens,
 
102
  top_p,
103
  top_k,
104
  repetition_penalty
105
+ ))
106
+ return generated_text
107
 
108
  # Gradio Interface combining transcription and SOAP note generation
109
  demo = gr.Blocks(theme=gr.themes.Ocean())