Jyothirmai
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -24,11 +24,12 @@ def generate_caption_vitCoAtt(image):
|
|
24 |
return caption
|
25 |
|
26 |
|
27 |
-
gr.HTML("<h1 style='text-align: center;'>MedViT: A Vision Transformer-Driven Method for Generating Medical Reports π₯π€</h1>")
|
28 |
-
gr.HTML("<p style='text-align: center;'>You can generate captions by uploading an X-Ray and selecting a model of your choice below</p>")
|
29 |
-
|
30 |
|
31 |
with gr.Row():
|
|
|
|
|
|
|
|
|
32 |
|
33 |
image = gr.Image(label="Upload Chest X-ray", type="pil")
|
34 |
|
@@ -62,12 +63,13 @@ def predict(img, model_name, max_tokens, temperature):
|
|
62 |
|
63 |
examples = [[f"example{i}.jpg"] for i in range(1,4)]
|
64 |
|
65 |
-
|
|
|
66 |
|
67 |
interface = gr.Interface(
|
68 |
fn=predict,
|
69 |
inputs = [image, model_choice, max_tokens, temperature],
|
70 |
-
theme="
|
71 |
outputs=caption,
|
72 |
examples = examples
|
73 |
)
|
|
|
24 |
return caption
|
25 |
|
26 |
|
|
|
|
|
|
|
27 |
|
28 |
with gr.Row():
|
29 |
+
|
30 |
+
gr.HTML("<h1 style='text-align: center;'>MedViT: A Vision Transformer-Driven Method for Generating Medical Reports π₯π€</h1>")
|
31 |
+
gr.HTML("<p style='text-align: center;'>You can generate captions by uploading an X-Ray and selecting a model of your choice below</p>")
|
32 |
+
|
33 |
|
34 |
image = gr.Image(label="Upload Chest X-ray", type="pil")
|
35 |
|
|
|
63 |
|
64 |
examples = [[f"example{i}.jpg"] for i in range(1,4)]
|
65 |
|
66 |
+
description= "You can generate captions by uploading an X-Ray and selecting a model of your choice below. Please select the number of Max Tokens and Temperature setting, if you are testing CLIP GPT2 and VIT GPT2 Models"
|
67 |
+
title = "MedViT: A Vision Transformer-Driven Method for Generating Medical Reports π₯π€"
|
68 |
|
69 |
interface = gr.Interface(
|
70 |
fn=predict,
|
71 |
inputs = [image, model_choice, max_tokens, temperature],
|
72 |
+
theme="soft",
|
73 |
outputs=caption,
|
74 |
examples = examples
|
75 |
)
|