bczhou commited on
Commit
2340fa0
1 Parent(s): deefd43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def generate_image_captions(image, text):
29
  max_new_tokens=50
30
  )
31
 
32
- prediction_text = processor.decode(prediction[0], num_beams=5, skip_special_tokens=True)
33
  return prediction_text
34
 
35
 
@@ -51,7 +51,7 @@ demo = gr.Interface(
51
  outputs="text",
52
  examples=[
53
  [os.path.join(os.getcwd(), 'two_bear.png'), ""],
54
- [os.path.join(os.getcwd(), 'three_women.png'), "What is the woman in the middle's dress's color is? Answer:"],
55
  [os.path.join(os.getcwd(), 'cat_with_food.png'), "Describe the picture:"],
56
  [os.path.join(os.getcwd(), 'dog_with_frisbee.png'), "What is the color of the frisbee in the photo? Answer:"],
57
  [os.path.join(os.getcwd(), 'stop_sign.png'), "What does the sign in the picture say? Answer:"]
 
29
  max_new_tokens=50
30
  )
31
 
32
+ prediction_text = processor.decode(prediction[0], skip_special_tokens=True)
33
  return prediction_text
34
 
35
 
 
51
  outputs="text",
52
  examples=[
53
  [os.path.join(os.getcwd(), 'two_bear.png'), ""],
54
+ [os.path.join(os.getcwd(), 'three_women.png'), "What is the woman in the middle's dress's color? Answer:"],
55
  [os.path.join(os.getcwd(), 'cat_with_food.png'), "Describe the picture:"],
56
  [os.path.join(os.getcwd(), 'dog_with_frisbee.png'), "What is the color of the frisbee in the photo? Answer:"],
57
  [os.path.join(os.getcwd(), 'stop_sign.png'), "What does the sign in the picture say? Answer:"]