sikeaditya commited on
Commit
674c814
·
verified ·
1 Parent(s): deadcbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -75,14 +75,7 @@ def get_scan_type(text):
75
  """Determine the type of scan from the text content"""
76
  text_lower = text.lower()
77
  scan_types = {
78
- 'ct': 'CT Scan',
79
- 'computed tomography': 'CT Scan',
80
- 'mri': 'MRI',
81
- 'magnetic resonance': 'MRI',
82
- 'ecg': 'ECG',
83
- 'electrocardiogram': 'ECG',
84
- 'x-ray': 'X-Ray',
85
- 'ultrasound': 'Ultrasound'
86
  }
87
 
88
  for key, value in scan_types.items():
@@ -91,7 +84,7 @@ def get_scan_type(text):
91
  return 'Unknown Scan Type'
92
 
93
  def analyze_medical_scan(scan_type, combined_text, image_count):
94
- """Generate analysis using Gemini API"""
95
  try:
96
  logging.debug(f"Initializing Gemini model with type: {GEMINI_MODEL}")
97
  model = genai.GenerativeModel(GEMINI_MODEL)
 
75
  """Determine the type of scan from the text content"""
76
  text_lower = text.lower()
77
  scan_types = {
78
+ 'electrocardiogram': 'ECG'
 
 
 
 
 
 
 
79
  }
80
 
81
  for key, value in scan_types.items():
 
84
  return 'Unknown Scan Type'
85
 
86
  def analyze_medical_scan(scan_type, combined_text, image_count):
87
+ """Generate analysis """
88
  try:
89
  logging.debug(f"Initializing Gemini model with type: {GEMINI_MODEL}")
90
  model = genai.GenerativeModel(GEMINI_MODEL)