Spaces:
Sleeping
Sleeping
Update
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def caption_image(input_image: np.ndarray):
|
|
| 15 |
inputs = processor(raw_image, return_tensors="pt")
|
| 16 |
|
| 17 |
# Generate a caption for the image
|
| 18 |
-
out = model.generate(**inputs,max_length=50)
|
| 19 |
|
| 20 |
# Decode the generated tokens to text
|
| 21 |
caption = processor.decode(out[0], skip_special_tokens=True)
|
|
@@ -26,8 +26,8 @@ iface = gr.Interface(
|
|
| 26 |
fn=caption_image,
|
| 27 |
inputs=gr.Image(),
|
| 28 |
outputs="text",
|
| 29 |
-
title="Image Captioning Kliz Millares",
|
| 30 |
-
description="
|
| 31 |
)
|
| 32 |
|
| 33 |
-
iface.launch()
|
|
|
|
| 15 |
inputs = processor(raw_image, return_tensors="pt")
|
| 16 |
|
| 17 |
# Generate a caption for the image
|
| 18 |
+
out = model.generate(**inputs, max_length=50)
|
| 19 |
|
| 20 |
# Decode the generated tokens to text
|
| 21 |
caption = processor.decode(out[0], skip_special_tokens=True)
|
|
|
|
| 26 |
fn=caption_image,
|
| 27 |
inputs=gr.Image(),
|
| 28 |
outputs="text",
|
| 29 |
+
title="Image Captioning - Kliz Andrei Millares™",
|
| 30 |
+
description="Generate descriptive captions for your images using the BLIP model, brought to you by Kliz Andrei Millares™."
|
| 31 |
)
|
| 32 |
|
| 33 |
+
iface.launch()
|