Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -71,9 +71,9 @@ with gr.Blocks() as demo:
|
|
| 71 |
|
| 72 |
with gr.Row():
|
| 73 |
with gr.Column():
|
| 74 |
-
image_a = gr.Image(label="图片A", type="
|
| 75 |
with gr.Column():
|
| 76 |
-
image_b = gr.Image(label="图片B", type="
|
| 77 |
|
| 78 |
analyze_button = gr.Button("分析图片")
|
| 79 |
result_caption_a = gr.Textbox(label="图片A描述", interactive=False)
|
|
@@ -93,4 +93,4 @@ with gr.Blocks() as demo:
|
|
| 93 |
outputs=[result_caption_a, result_caption_b, result_similarity, result_latent_diff, result_text_analysis]
|
| 94 |
)
|
| 95 |
|
| 96 |
-
demo.launch()
|
|
|
|
| 71 |
|
| 72 |
with gr.Row():
|
| 73 |
with gr.Column():
|
| 74 |
+
image_a = gr.Image(label="图片A", type="pil") # 使用 PIL 类型
|
| 75 |
with gr.Column():
|
| 76 |
+
image_b = gr.Image(label="图片B", type="pil") # 使用 PIL 类型
|
| 77 |
|
| 78 |
analyze_button = gr.Button("分析图片")
|
| 79 |
result_caption_a = gr.Textbox(label="图片A描述", interactive=False)
|
|
|
|
| 93 |
outputs=[result_caption_a, result_caption_b, result_similarity, result_latent_diff, result_text_analysis]
|
| 94 |
)
|
| 95 |
|
| 96 |
+
demo.launch()
|