title = "OctoBERT" description = """Interactive Demo for OctoBERT. This base model is trained only on Flickr-30k.""" examples =[ ['swing.jpg','The woman stands outdoors, next to a child in a .'], ['tennis.jpg', 'A woman in blue shorts and white shirt holds a tennis racket on a blue court.'], ['birthday.jpg', 'The smiling is celebrating her party with friends, surrounded by balloons and a with candles.'], ['skate.jpg', 'A person in a rainbow colored snowsuit is snowboarding down a slope.'], ['street.jpg', 'A man with plays with a little girl while walking down the street, while an Asian woman walks ahead of them.'], ['dog.jpg', 'A black dog stands on a , green fields behind him.'], ] gr.Interface( plot_inference, [gr.inputs.Image(type="pil", label="Input"), gr.inputs.Textbox(label="input text")], [gr.outputs.Image(type="file", label="Output"), gr.outputs.Textbox(label="Predicted Words")], title=title, description=description, examples=examples, cache_examples=False, ).launch()