jyothsnasmohan commited on
Commit
745e7b0
·
verified ·
1 Parent(s): 783df1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -6,13 +6,11 @@ from transformers.utils import logging
6
  logging.set_verbosity_error()
7
 
8
  import warnings
9
- warnings.filterwarnings("ignore",
10
- message="Using the model-agnostic default `max_length`")
11
  import os
12
  import gradio as gr
13
  from transformers import pipeline
14
- pipe = pipeline("image-to-text",
15
- model="Salesforce/blip-image-captioning-base")
16
  def launch(input):
17
  out = pipe(input)
18
  return out[0]['generated_text']
 
6
  logging.set_verbosity_error()
7
 
8
  import warnings
9
+ warnings.filterwarnings("ignore",message="Using the model-agnostic default `max_length`")
 
10
  import os
11
  import gradio as gr
12
  from transformers import pipeline
13
+ pipe = pipeline("image-to-text,model="Salesforce/blip-image-captioning-base")
 
14
  def launch(input):
15
  out = pipe(input)
16
  return out[0]['generated_text']