krishnv commited on
Commit
d688b4b
1 Parent(s): 947d2f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,8 +20,8 @@ def predict(image, max_length=64, num_beams=4):
20
  caption_text = clean_text(tokenizer.decode(caption_ids, skip_special_tokens=True))
21
  return caption_text
22
 
23
- # Updated to use new Gradio API
24
- input_image = gr.Image(label="Upload your Image", type='pil', optional=True)
25
  output_text = gr.Textbox(label="Captions")
26
 
27
  examples = [f"example{i}.jpg" for i in range(1, 7)]
 
20
  caption_text = clean_text(tokenizer.decode(caption_ids, skip_special_tokens=True))
21
  return caption_text
22
 
23
+ # Remove 'optional=True' from gr.Image
24
+ input_image = gr.Image(label="Upload your Image", type='pil')
25
  output_text = gr.Textbox(label="Captions")
26
 
27
  examples = [f"example{i}.jpg" for i in range(1, 7)]