SreekarB commited on
Commit
861f14f
Β·
verified Β·
1 Parent(s): 24682d3

Update annotated_casl_app.py

Browse files
Files changed (1) hide show
  1. annotated_casl_app.py +6 -6
annotated_casl_app.py CHANGED
@@ -1388,7 +1388,7 @@ with gr.Blocks(title="Speech Analysis", theme=gr.themes.Soft()) as demo:
1388
  example_btn = gr.Button("πŸ“„ Load Example Transcript", variant="secondary", size="sm")
1389
 
1390
  # Single main analysis button
1391
- ultimate_analysis_btn = gr.Button("πŸš€ Run Complete CASL Analysis", variant="primary", size="lg")
1392
 
1393
  with gr.Column(scale=3):
1394
  status_display = gr.Markdown("Ready to analyze transcript")
@@ -1683,7 +1683,7 @@ with gr.Blocks(title="Speech Analysis", theme=gr.themes.Soft()) as demo:
1683
 
1684
  # STEP 4: Create the final comprehensive prompt
1685
  final_prompt = f"""
1686
- You are a speech-language pathologist conducting the FINAL COMPREHENSIVE 12-SECTION CASL ANALYSIS.
1687
 
1688
  Patient: {age}-year-old {gender}
1689
 
@@ -1781,8 +1781,8 @@ with gr.Blocks(title="Speech Analysis", theme=gr.themes.Soft()) as demo:
1781
 
1782
  return annotated_transcript, analysis_result, "βœ… Complete analysis finished!"
1783
 
1784
- def run_complete_casl_analysis(transcript_content, age, gender, slp_notes):
1785
- """Run the complete CASL analysis pipeline with ultimate analysis"""
1786
  if not transcript_content or len(transcript_content.strip()) < 50:
1787
  return "Error: Please provide a longer transcript for analysis.", "", "❌ Error"
1788
 
@@ -1795,11 +1795,11 @@ with gr.Blocks(title="Speech Analysis", theme=gr.themes.Soft()) as demo:
1795
  # Step 2: Run ultimate analysis
1796
  ultimate_result = run_ultimate_analysis(annotated_transcript, transcript_content, age, gender, slp_notes)
1797
 
1798
- return annotated_transcript, ultimate_result, "βœ… Complete CASL analysis finished!"
1799
 
1800
  # Single main event handler
1801
  ultimate_analysis_btn.click(
1802
- fn=run_complete_casl_analysis,
1803
  inputs=[transcript_input, age_input, gender_input, slp_notes_input],
1804
  outputs=[annotated_output, analysis_output, status_display]
1805
  )
 
1388
  example_btn = gr.Button("πŸ“„ Load Example Transcript", variant="secondary", size="sm")
1389
 
1390
  # Single main analysis button
1391
+ ultimate_analysis_btn = gr.Button("πŸš€ Run Complete Speech Analysis", variant="primary", size="lg")
1392
 
1393
  with gr.Column(scale=3):
1394
  status_display = gr.Markdown("Ready to analyze transcript")
 
1683
 
1684
  # STEP 4: Create the final comprehensive prompt
1685
  final_prompt = f"""
1686
+ You are a speech-language pathologist conducting the FINAL COMPREHENSIVE 12-SECTION SPEECH ANALYSIS.
1687
 
1688
  Patient: {age}-year-old {gender}
1689
 
 
1781
 
1782
  return annotated_transcript, analysis_result, "βœ… Complete analysis finished!"
1783
 
1784
+ def run_complete_speech_analysis(transcript_content, age, gender, slp_notes):
1785
+ """Run the complete speech analysis pipeline with ultimate analysis"""
1786
  if not transcript_content or len(transcript_content.strip()) < 50:
1787
  return "Error: Please provide a longer transcript for analysis.", "", "❌ Error"
1788
 
 
1795
  # Step 2: Run ultimate analysis
1796
  ultimate_result = run_ultimate_analysis(annotated_transcript, transcript_content, age, gender, slp_notes)
1797
 
1798
+ return annotated_transcript, ultimate_result, "βœ… Complete speech analysis finished!"
1799
 
1800
  # Single main event handler
1801
  ultimate_analysis_btn.click(
1802
+ fn=run_complete_speech_analysis,
1803
  inputs=[transcript_input, age_input, gender_input, slp_notes_input],
1804
  outputs=[annotated_output, analysis_output, status_display]
1805
  )