Spaces:
Runtime error
Runtime error
Commit
·
55eaaa7
1
Parent(s):
5fadd16
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ model, vis_processors, _ = load_model_and_preprocess(
|
|
13 |
def predict(image):
|
14 |
pre_processed_image = vis_processors["eval"](image).unsqueeze(0).to(device)
|
15 |
response = model.generate({"image": pre_processed_image}, use_nucleus_sampling=True, num_captions=3)
|
16 |
-
return image, "
|
17 |
|
18 |
demo = gr.Interface(
|
19 |
title="Image Captioning - BLIP",
|
|
|
13 |
def predict(image):
|
14 |
pre_processed_image = vis_processors["eval"](image).unsqueeze(0).to(device)
|
15 |
response = model.generate({"image": pre_processed_image}, use_nucleus_sampling=True, num_captions=3)
|
16 |
+
return image, "\n".join(response)
|
17 |
|
18 |
demo = gr.Interface(
|
19 |
title="Image Captioning - BLIP",
|