Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,19 +1,8 @@
|
|
| 1 |
-
from transformers.utils import logging
|
| 2 |
-
import warnings
|
| 3 |
-
import os
|
| 4 |
import gradio as gr
|
| 5 |
-
from
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
warnings.filterwarnings("ignore",
|
| 12 |
-
message="Using the model-agnostic default `max_length`")
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
pipe = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
|
| 17 |
|
| 18 |
def launch(input):
|
| 19 |
out = pipe(input)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformer import pipeline
|
| 3 |
|
| 4 |
+
pipe = pipeline("image-to-text",
|
| 5 |
+
model="Salesforce/blip-image-captioning-base")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
def launch(input):
|
| 8 |
out = pipe(input)
|