Jesse Liu commited on
Commit
f8c1982
·
1 Parent(s): bcb1d21

Fix: remove openai-whisper from requirements, make whisper optional in code

Browse files
Files changed (2) hide show
  1. Qwen__Qwen2.5-7B-Instruct_io.jsonl +0 -0
  2. chatgpt.py +15 -3
Qwen__Qwen2.5-7B-Instruct_io.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
chatgpt.py CHANGED
@@ -942,9 +942,21 @@ with gr.Blocks() as app:
942
  patient_id = full_id.split('_')[0] if '_' in full_id else full_id
943
  admission_id = '1' # Default admission ID
944
 
945
- # Get input and output fields
946
- input_text = entry.get('input', '')
947
- raw_summary = entry.get('output', '')
 
 
 
 
 
 
 
 
 
 
 
 
948
  # Clean the output to extract only markdown summary
949
  summary = clean_summary_output(raw_summary)
950
 
 
942
  patient_id = full_id.split('_')[0] if '_' in full_id else full_id
943
  admission_id = '1' # Default admission ID
944
 
945
+ # Get input and output fields (support multiple schema variants)
946
+ # New Qwen JSONL uses 'patient_input' and 'output_text';
947
+ # older versions used 'input' and 'output'.
948
+ input_text = (
949
+ entry.get('patient_input')
950
+ or entry.get('input')
951
+ or entry.get('patient_input_text')
952
+ or ''
953
+ )
954
+ raw_summary = (
955
+ entry.get('output')
956
+ or entry.get('output_text')
957
+ or entry.get('summary')
958
+ or ''
959
+ )
960
  # Clean the output to extract only markdown summary
961
  summary = clean_summary_output(raw_summary)
962