Spaces:
Build error
Build error
Ahsen Khaliq
commited on
Commit
•
2ef97f1
1
Parent(s):
48370a8
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import os
|
2 |
-
os.system("wget https://upload.wikimedia.org/wikipedia/commons/thumb/e/
|
3 |
|
4 |
from PIL import Image
|
5 |
import requests
|
@@ -42,11 +42,11 @@ def inference(raw_image):
|
|
42 |
inputs = gr.inputs.Image(type='pil')
|
43 |
outputs = gr.outputs.Textbox(label="Output")
|
44 |
|
45 |
-
title = "
|
46 |
|
47 |
-
description = "Gradio demo for
|
48 |
|
49 |
-
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2201.
|
50 |
|
51 |
|
52 |
-
gr.Interface(inference, inputs, outputs, title=title, description=description, article=article, examples=[['
|
|
|
1 |
import os
|
2 |
+
os.system("wget https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg/1920px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg -O starry.jpg")
|
3 |
|
4 |
from PIL import Image
|
5 |
import requests
|
|
|
42 |
inputs = gr.inputs.Image(type='pil')
|
43 |
outputs = gr.outputs.Textbox(label="Output")
|
44 |
|
45 |
+
title = "BLIP"
|
46 |
|
47 |
+
description = "Gradio demo for BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
48 |
|
49 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2201.12086' target='_blank'>BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation</a> | <a href='https://github.com/salesforce/BLIP' target='_blank'>Github Repo</a></p>"
|
50 |
|
51 |
|
52 |
+
gr.Interface(inference, inputs, outputs, title=title, description=description, article=article, examples=[['starry.jpg']]).launch(enable_queue=True,cache_examples=True)
|