hssling commited on
Commit
a5b3750
·
1 Parent(s): f0e7aa1

Increase max tokens and temperature for richer clinical narratives

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,7 +23,7 @@ if ADAPTER_ID:
23
  except Exception as e:
24
  print(f"Failed to load adapter. Using base model. Error: {e}")
25
 
26
- def diagnose_ecg(image: Image.Image = None, temp: float = 0.2, max_tokens: int = 1500):
27
  try:
28
  if image is None:
29
  return json.dumps({"error": "No image provided."})
@@ -69,8 +69,8 @@ demo = gr.Interface(
69
  fn=diagnose_ecg,
70
  inputs=[
71
  gr.Image(type="pil", label="ECG Image Scan"),
72
- gr.Slider(minimum=0.0, maximum=1.0, value=0.2, step=0.1, label="Temperature"),
73
- gr.Slider(minimum=256, maximum=4096, value=1500, step=256, label="Max Tokens")
74
  ],
75
  outputs=gr.Markdown(label="Clinical Report Output"),
76
  title="CardioAI Inference API",
 
23
  except Exception as e:
24
  print(f"Failed to load adapter. Using base model. Error: {e}")
25
 
26
+ def diagnose_ecg(image: Image.Image = None, temp: float = 0.4, max_tokens: int = 2000):
27
  try:
28
  if image is None:
29
  return json.dumps({"error": "No image provided."})
 
69
  fn=diagnose_ecg,
70
  inputs=[
71
  gr.Image(type="pil", label="ECG Image Scan"),
72
+ gr.Slider(minimum=0.0, maximum=1.0, value=0.4, step=0.1, label="Temperature"),
73
+ gr.Slider(minimum=256, maximum=4096, value=2000, step=256, label="Max Tokens")
74
  ],
75
  outputs=gr.Markdown(label="Clinical Report Output"),
76
  title="CardioAI Inference API",