Spaces:
Build error
Build error
update gradio button
Browse files
app.py
CHANGED
@@ -169,14 +169,18 @@ with gr.Blocks(title="Clinical Consultation Summarizer", theme=gr.themes.Soft())
|
|
169 |
|
170 |
# Processing
|
171 |
process_btn.click(
|
172 |
-
|
|
|
|
|
|
|
|
|
173 |
inputs=[audio_input, hf_token],
|
174 |
outputs=[transcript_output, gr.State()]
|
175 |
-
).
|
176 |
fn=generate_soap_notes,
|
177 |
inputs=[transcript_output, model_choice, anonymize_check],
|
178 |
outputs=soap_output
|
179 |
-
).
|
180 |
fn=extract_medical_entities,
|
181 |
inputs=transcript_output,
|
182 |
outputs=entity_output
|
|
|
169 |
|
170 |
# Processing
|
171 |
process_btn.click(
|
172 |
+
fn=lambda audio, token: load_models(token), # Just load models first
|
173 |
+
inputs=[audio_input, hf_token],
|
174 |
+
outputs=[transcript_output, gr.State()]
|
175 |
+
).then(
|
176 |
+
fn=transcribe_and_diarize,
|
177 |
inputs=[audio_input, hf_token],
|
178 |
outputs=[transcript_output, gr.State()]
|
179 |
+
).then(
|
180 |
fn=generate_soap_notes,
|
181 |
inputs=[transcript_output, model_choice, anonymize_check],
|
182 |
outputs=soap_output
|
183 |
+
).then(
|
184 |
fn=extract_medical_entities,
|
185 |
inputs=transcript_output,
|
186 |
outputs=entity_output
|