Commit
·
ce3fc4d
1
Parent(s):
6ded388
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,4 +47,12 @@ output_text = gr.outputs.Text()
|
|
| 47 |
|
| 48 |
# Create Gradio interface
|
| 49 |
iface = gr.Interface(
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
# Create Gradio interface
|
| 49 |
iface = gr.Interface(
|
| 50 |
+
fn=blip2_interface,
|
| 51 |
+
inputs=[image_input, text_input, text_input, text_input],
|
| 52 |
+
outputs=[output_text, output_text, output_text, output_text],
|
| 53 |
+
title="BLIP-2 Image Captioning and VQA",
|
| 54 |
+
description="Interact with the BLIP-2 model for image captioning, prompted image captioning, visual question answering, and chat-based prompting.",
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
if __name__ == "__main__":
|
| 58 |
+
iface.launch()
|