Spaces:
Running
Running
Update app.py
Browse files
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.
|
54 |
-
gr.
|
55 |
],
|
56 |
-
outputs=gr.
|
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()
|