Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,6 +49,10 @@ def generate_response(image, text):
|
|
49 |
|
50 |
return response
|
51 |
|
|
|
|
|
|
|
|
|
52 |
iface = gr.Interface(
|
53 |
fn=generate_response,
|
54 |
inputs=[
|
@@ -58,6 +62,7 @@ iface = gr.Interface(
|
|
58 |
outputs="text",
|
59 |
title="Llava-QW",
|
60 |
description="上传一张图片并输入你的问题,模型将生成相应的回答。",
|
|
|
61 |
)
|
62 |
|
63 |
-
iface.launch()
|
|
|
49 |
|
50 |
return response
|
51 |
|
52 |
+
examples = [
|
53 |
+
["./text.png", "图中的文字是什么?"],
|
54 |
+
]
|
55 |
+
|
56 |
iface = gr.Interface(
|
57 |
fn=generate_response,
|
58 |
inputs=[
|
|
|
62 |
outputs="text",
|
63 |
title="Llava-QW",
|
64 |
description="上传一张图片并输入你的问题,模型将生成相应的回答。",
|
65 |
+
examples=examples # 添加示例
|
66 |
)
|
67 |
|
68 |
+
iface.launch()
|