kengui commited on
Commit
a00283a
·
verified ·
1 Parent(s): 3d305c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -14
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 transformers import pipeline
6
 
7
-
8
- logging.set_verbosity_error()
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)