Jyothirmai commited on
Commit
0759962
·
verified ·
1 Parent(s): 46320f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -29,7 +29,7 @@ sample_images = [
29
  with gr.Blocks() as demo:
30
  with gr.Row():
31
  image = gr.Image(label="Upload Chest X-ray")
32
- # sample_image_gallery = gr.ImageGallery(sample_images, label="Sample Images")
33
  with gr.Row():
34
  model_choice = gr.Radio(["CLIP-GPT2", "ViT-GPT2", "ViT-CoAttention"], label="Select Model")
35
  with gr.Row():
@@ -43,7 +43,7 @@ with gr.Blocks() as demo:
43
  return "Caption generation for this model is not yet implemented."
44
 
45
  # Handle changes for both uploaded and sample images
46
- gr.Image.change(predict, [image, model_choice], caption)
47
- # sample_image_gallery.change(predict, [sample_image_gallery, model_choice], caption)
48
 
49
  demo.launch()
 
29
  with gr.Blocks() as demo:
30
  with gr.Row():
31
  image = gr.Image(label="Upload Chest X-ray")
32
+ sample_image_gallery = gr.ImageGallery(sample_images, label="Sample Images")
33
  with gr.Row():
34
  model_choice = gr.Radio(["CLIP-GPT2", "ViT-GPT2", "ViT-CoAttention"], label="Select Model")
35
  with gr.Row():
 
43
  return "Caption generation for this model is not yet implemented."
44
 
45
  # Handle changes for both uploaded and sample images
46
+ image.change(predict, [image, model_choice], caption)
47
+ sample_image_gallery.change(predict, [sample_image_gallery, model_choice], caption)
48
 
49
  demo.launch()