Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,13 +28,12 @@ sample_images = [
|
|
| 28 |
# Gradio interface
|
| 29 |
with gr.Blocks() as demo:
|
| 30 |
with gr.Row():
|
| 31 |
-
image = gr.Image(label="Upload Chest X-ray")
|
| 32 |
-
|
| 33 |
with gr.Row():
|
| 34 |
model_choice = gr.Radio(["CLIP-GPT2", "ViT-GPT2", "ViT-CoAttention"], label="Select Model")
|
| 35 |
with gr.Row():
|
| 36 |
caption = gr.Textbox(label="Generated Caption")
|
| 37 |
-
|
| 38 |
def predict(img, model_name):
|
| 39 |
if model_name == "CLIP-GPT2":
|
| 40 |
return generate_caption_clipgpt(img)
|
|
|
|
| 28 |
# Gradio interface
|
| 29 |
with gr.Blocks() as demo:
|
| 30 |
with gr.Row():
|
| 31 |
+
image = gr.Image(label="Upload Chest X-ray")
|
| 32 |
+
sample_images = gr.Images(sample_images, label="Sample Images") # Updated Component Name
|
| 33 |
with gr.Row():
|
| 34 |
model_choice = gr.Radio(["CLIP-GPT2", "ViT-GPT2", "ViT-CoAttention"], label="Select Model")
|
| 35 |
with gr.Row():
|
| 36 |
caption = gr.Textbox(label="Generated Caption")
|
|
|
|
| 37 |
def predict(img, model_name):
|
| 38 |
if model_name == "CLIP-GPT2":
|
| 39 |
return generate_caption_clipgpt(img)
|