Jyothirmai
commited on
Commit
•
281dd11
1
Parent(s):
c8b938d
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ with gr.Blocks() as demo:
|
|
40 |
]
|
41 |
|
42 |
|
43 |
-
image = gr.Image(label="Upload Chest X-ray")
|
44 |
|
45 |
sample_images_gallery = gr.Gallery(value = sample_images,label="Sample Images")
|
46 |
|
@@ -50,7 +50,7 @@ with gr.Blocks() as demo:
|
|
50 |
|
51 |
caption = gr.Textbox(label="Generated Caption")
|
52 |
|
53 |
-
def predict(img, model_name
|
54 |
if model_name == "CLIP-GPT2":
|
55 |
return generate_caption_clipgpt(img)
|
56 |
elif model_name == "ViT-GPT2":
|
|
|
40 |
]
|
41 |
|
42 |
|
43 |
+
image = gr.Image(label="Upload Chest X-ray", type="pil")
|
44 |
|
45 |
sample_images_gallery = gr.Gallery(value = sample_images,label="Sample Images")
|
46 |
|
|
|
50 |
|
51 |
caption = gr.Textbox(label="Generated Caption")
|
52 |
|
53 |
+
def predict(img, model_name):
|
54 |
if model_name == "CLIP-GPT2":
|
55 |
return generate_caption_clipgpt(img)
|
56 |
elif model_name == "ViT-GPT2":
|