lyttt commited on
Commit
ab2ce79
·
1 Parent(s): ea1edb1

Add application file

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -9,8 +9,7 @@ model = AutoModel.from_pretrained(model_name_or_path, revision="master", trust_r
9
  def greet(image):
10
  image = image.convert("RGB")
11
  with torch.no_grad():
12
- outputs = model([image]).generated_text
13
-
14
  return output
15
 
16
  demo = gr.Interface(fn=greet, inputs="image", outputs="text")
 
9
  def greet(image):
10
  image = image.convert("RGB")
11
  with torch.no_grad():
12
+ outputs = model([image]).generated_text[0]
 
13
  return output
14
 
15
  demo = gr.Interface(fn=greet, inputs="image", outputs="text")