SmartHeal commited on
Commit
c9c6cf5
·
verified ·
1 Parent(s): bfd9991

Update src/ai_processor.py

Browse files
Files changed (1) hide show
  1. src/ai_processor.py +2 -2
src/ai_processor.py CHANGED
@@ -138,7 +138,7 @@ Provide a structured report with:
138
  return "⚠️ GPU worker unavailable"
139
  except Exception:
140
  # If `spaces` cannot be imported locally, expose a CPU-safe stub with same signature.
141
- def generate_medgemma_report_with_timeout(
142
  patient_info: str,
143
  visual_results: Dict,
144
  guideline_context: str,
@@ -420,7 +420,7 @@ Automated analysis provides quantitative measurements; verify via clinical exami
420
  ) -> str:
421
  """Use GPU path when available, fallback otherwise."""
422
  try:
423
- report = generate_medgemma_report_with_timeout(
424
  patient_info, visual_results, guideline_context, image_pil, max_new_tokens
425
  )
426
  if report and report.strip() and not report.startswith(("⚠️", "❌")):
 
138
  return "⚠️ GPU worker unavailable"
139
  except Exception:
140
  # If `spaces` cannot be imported locally, expose a CPU-safe stub with same signature.
141
+ def generate_medgemma_report(
142
  patient_info: str,
143
  visual_results: Dict,
144
  guideline_context: str,
 
420
  ) -> str:
421
  """Use GPU path when available, fallback otherwise."""
422
  try:
423
+ report = generate_medgemma_report(
424
  patient_info, visual_results, guideline_context, image_pil, max_new_tokens
425
  )
426
  if report and report.strip() and not report.startswith(("⚠️", "❌")):