Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
from prefix_clip import
|
4 |
from gpt2_story_gen import generate_story
|
5 |
|
6 |
-
|
7 |
-
|
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):
|