Dibiddo commited on
Commit
0ea52a7
·
verified ·
1 Parent(s): d9233f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -46,18 +46,18 @@ def recognize_and_analyze(image, text_prompt):
46
 
47
  return output_text[0]
48
 
49
- # 设置Gradio界面
50
  interface = gr.Interface(
51
  fn=recognize_and_analyze,
52
  inputs=[
53
- gr.inputs.Image(type="filepath", label="上传图像"),
54
- gr.inputs.Textbox(label="输入描述文本"),
55
  ],
56
- outputs=gr.outputs.Textbox(label="识别结果"),
57
  title="Qwen2.5-VL 物体识别与分析",
58
  description="上传图像并输入描述文本以获取识别和分析结果。",
59
  )
60
 
61
- # 启动Gradio应用
62
  if __name__ == "__main__":
63
  interface.launch()
 
46
 
47
  return output_text[0]
48
 
49
+ # 设置 Gradio 界面
50
  interface = gr.Interface(
51
  fn=recognize_and_analyze,
52
  inputs=[
53
+ gr.Image(type="filepath", label="上传图像"),
54
+ gr.Textbox(label="输入描述文本"),
55
  ],
56
+ outputs=gr.Textbox(label="识别结果"),
57
  title="Qwen2.5-VL 物体识别与分析",
58
  description="上传图像并输入描述文本以获取识别和分析结果。",
59
  )
60
 
61
+ # 启动 Gradio 应用
62
  if __name__ == "__main__":
63
  interface.launch()