Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,8 @@ import gradio as gr
|
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
-
|
|
|
|
| 7 |
|
| 8 |
# Load vision capability to support image display
|
| 9 |
##pip install datasets
|
|
@@ -39,5 +40,3 @@ print (selected_image)
|
|
| 39 |
##processor = AutoProcessor.from_pretrained("Salesforce/blip-image-captioning-large")
|
| 40 |
##model = AutoModelForVision2Seq.from_pretrained("Salesforce/blip-image-captioning-large")
|
| 41 |
|
| 42 |
-
|
| 43 |
-
demo.launch()
|
|
|
|
| 3 |
def greet(name):
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="image")
|
| 7 |
+
demo.launch()
|
| 8 |
|
| 9 |
# Load vision capability to support image display
|
| 10 |
##pip install datasets
|
|
|
|
| 40 |
##processor = AutoProcessor.from_pretrained("Salesforce/blip-image-captioning-large")
|
| 41 |
##model = AutoModelForVision2Seq.from_pretrained("Salesforce/blip-image-captioning-large")
|
| 42 |
|
|
|
|
|
|