Spaces:
Runtime error
Runtime error
improve frontent
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
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}
|
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",
|
|
|
|
|
|
|
|
|
|
|
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()
|