awacke1 commited on
Commit
b1af48e
1 Parent(s): ab4fd24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def predict_step(image_paths):
29
  preds = [pred.strip() for pred in preds]
30
  return preds
31
 
32
- torch.hub.download_url_to_file('https://github.com/AaronCWacker/Yggdrasil/blob/main/images/35-Favorite-Games.jpg', '35-Favorite-Games.jpg')
33
 
34
  #result = predict_step(['35-Favorite-Games.jpg'])
35
 
@@ -47,7 +47,8 @@ article = "nlpconnect/vit-gpt2-image-captioning"
47
 
48
  input = gr.inputs.Image(label="Upload your Image", type = 'pil', optional=True)
49
  output = gr.outputs.Textbox(type="auto",label="Captions")
50
- examples = [['35-Favorite-Games.jpg']]
 
51
 
52
  interface = gr.Interface(
53
  fn=predict,
 
29
  preds = [pred.strip() for pred in preds]
30
  return preds
31
 
32
+ #torch.hub.download_url_to_file('https://github.com/AaronCWacker/Yggdrasil/blob/main/images/35-Favorite-Games.jpg', '35-Favorite-Games.jpg')
33
 
34
  #result = predict_step(['35-Favorite-Games.jpg'])
35
 
 
47
 
48
  input = gr.inputs.Image(label="Upload your Image", type = 'pil', optional=True)
49
  output = gr.outputs.Textbox(type="auto",label="Captions")
50
+ #examples = [['35-Favorite-Games.jpg']]
51
+ examples = [f"{i}.jpg" for i in range(1,7)]
52
 
53
  interface = gr.Interface(
54
  fn=predict,