Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,8 +18,8 @@ def generate_caption(image):
|
|
| 18 |
# 创建Gradio界面
|
| 19 |
interface = gr.Interface(
|
| 20 |
fn=generate_caption,
|
| 21 |
-
inputs=gr.
|
| 22 |
-
outputs=
|
| 23 |
title="Image Captioning with BLIP",
|
| 24 |
description="上传一张图片,使用Salesforce的BLIP模型生成描述。",
|
| 25 |
)
|
|
|
|
| 18 |
# 创建Gradio界面
|
| 19 |
interface = gr.Interface(
|
| 20 |
fn=generate_caption,
|
| 21 |
+
inputs=gr.Image(type="pil"),
|
| 22 |
+
outputs=gr.Textbox(),
|
| 23 |
title="Image Captioning with BLIP",
|
| 24 |
description="上传一张图片,使用Salesforce的BLIP模型生成描述。",
|
| 25 |
)
|