AI-trainer1 commited on
Commit
84f674d
·
verified ·
1 Parent(s): d107a3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,8 +10,8 @@ class ImageCaption:
10
  def generate(self,img):
11
  if isinstance(img,str):
12
  img = Image.open(img)
13
- text = "Explain this image,that what she is doing and what kind of expression is it"
14
- input = self.processor(img,text=text,return_tensors='pt')
15
  # print(**input)
16
  output = self.model.generate(**input)
17
  caption = self.processor.decode(output[0],skip_special_tokens = True)
 
10
  def generate(self,img):
11
  if isinstance(img,str):
12
  img = Image.open(img)
13
+ # text = "Explain this image,that what she is doing and what kind of expression is it"
14
+ input = self.processor(img,return_tensors='pt')
15
  # print(**input)
16
  output = self.model.generate(**input)
17
  caption = self.processor.decode(output[0],skip_special_tokens = True)