PSNbst commited on
Commit
b80196d
·
verified ·
1 Parent(s): 9f37b25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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="file")
75
  with gr.Column():
76
- image_b = gr.Image(label="图片B", type="file")
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()