Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
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)]
|
|
|
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)]
|