shpotes commited on
Commit
119fb19
β€’
1 Parent(s): 9b070b0

improve frontent

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +7 -2
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Medical diagnosis evaluation via MedCLIP
3
  emoji: πŸ‘©β€βš•οΈ
4
  colorFrom: blue
5
  colorTo: indigo
 
1
  ---
2
+ title: Your personal TA via MedCLIP
3
  emoji: πŸ‘©β€βš•οΈ
4
  colorFrom: blue
5
  colorTo: indigo
app.py CHANGED
@@ -58,11 +58,16 @@ def score_image_caption_pair(uploaded_file, text_input):
58
  local_image_path = save_file_to_disk(uploaded_file)
59
  score = run_inference(
60
  local_image_path, text_input, model, tokenizer).tolist()
61
- return {"Score": score}, "{:.2f}".format(score)
62
 
63
 
64
  image = gr.inputs.Image(shape=(299, 299))
65
  iface = gr.Interface(
66
- fn=score_image_caption_pair, inputs=[image, "text"], outputs=["label", "text"]
 
 
 
 
 
67
  )
68
  iface.launch()
 
58
  local_image_path = save_file_to_disk(uploaded_file)
59
  score = run_inference(
60
  local_image_path, text_input, model, tokenizer).tolist()
61
+ return {"Score": score}
62
 
63
 
64
  image = gr.inputs.Image(shape=(299, 299))
65
  iface = gr.Interface(
66
+ fn=score_image_caption_pair, inputs=[image, "text"], outputs=["label"], allow_flagging=False,
67
+ title="Medical diagnosis evaluation via MedCLIP",
68
+ description="""
69
+ The purpose of this demo is to help medical students measure their diagnostic capabilities in purely academic settings.
70
+ Under no circumstances should it be used to make a self-diagnosis or confront a real doctor.
71
+ """
72
  )
73
  iface.launch()