bipin commited on
Commit
718c50f
1 Parent(s): 200f38c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -1,12 +1,10 @@
1
  import gradio as gr
2
 
3
- from prefix_clip import download_pretrained_model, generate_caption
4
  from gpt2_story_gen import generate_story
5
 
6
- coco_weights = 'coco_weights.pt'
7
- conceptual_weights = 'conceptual_weights.pt'
8
- download_pretrained_model('coco', file_to_save=coco_weights)
9
- download_pretrained_model('conceptual', file_to_save=conceptual_weights)
10
 
11
 
12
  def main(pil_image, genre, model, n_stories, use_beam_search=False):
 
1
  import gradio as gr
2
 
3
+ from prefix_clip import generate_caption
4
  from gpt2_story_gen import generate_story
5
 
6
+ conceptual_weights = hf_hub_download(repo_id="akhaliq/CLIP-prefix-captioning-conceptual-weights", filename="conceptual_weights.pt")
7
+ coco_weights = hf_hub_download(repo_id="akhaliq/CLIP-prefix-captioning-COCO-weights", filename="coco_weights.pt")
 
 
8
 
9
 
10
  def main(pil_image, genre, model, n_stories, use_beam_search=False):