Singularity666 commited on
Commit
eace5c6
·
1 Parent(s): c495dcf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -61,7 +61,7 @@ def download_link(content, filename, link_text):
61
  href = f'<a href="data:application/octet-stream;base64,{b64}" download="{filename}">{link_text}</a>'
62
  return href
63
 
64
- def show_predicted_caption(image, top_k=5):
65
  matches = predict_caption(
66
  image, model, text_embeddings, testing_df["caption"]
67
  )[:top_k]
@@ -77,7 +77,7 @@ def generate_radiology_report(prompt):
77
  stop=None,
78
  temperature=1,
79
  )
80
- report = response.choices[1].text.strip()
81
  # Remove reference string from the report
82
  report = re.sub(r'\(ROCO_\d+\)', '', report).strip()
83
  return report
 
61
  href = f'<a href="data:application/octet-stream;base64,{b64}" download="{filename}">{link_text}</a>'
62
  return href
63
 
64
+ def show_predicted_caption(image, top_k=8):
65
  matches = predict_caption(
66
  image, model, text_embeddings, testing_df["caption"]
67
  )[:top_k]
 
77
  stop=None,
78
  temperature=1,
79
  )
80
+ report = response.choices[0].text.strip()
81
  # Remove reference string from the report
82
  report = re.sub(r'\(ROCO_\d+\)', '', report).strip()
83
  return report