Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
-
|
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())
|