Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ nltk.download('omw-1.4')
|
|
26 |
nlp = spacy.load("en_core_web_sm")
|
27 |
|
28 |
# Load the pre-trained model for image captioning
|
29 |
-
model_name = "NourFakih/Vit-GPT2-COCO2017Flickr-85k-
|
30 |
model = VisionEncoderDecoderModel.from_pretrained(model_name)
|
31 |
feature_extractor = ViTImageProcessor.from_pretrained(model_name)
|
32 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
@@ -71,7 +71,7 @@ def search_captions(query, captions):
|
|
71 |
|
72 |
return results
|
73 |
|
74 |
-
st.title("Image
|
75 |
|
76 |
# Sidebar for search functionality
|
77 |
with st.sidebar:
|
|
|
26 |
nlp = spacy.load("en_core_web_sm")
|
27 |
|
28 |
# Load the pre-trained model for image captioning
|
29 |
+
model_name = "NourFakih/Vit-GPT2-COCO2017Flickr-85k-11"
|
30 |
model = VisionEncoderDecoderModel.from_pretrained(model_name)
|
31 |
feature_extractor = ViTImageProcessor.from_pretrained(model_name)
|
32 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
|
71 |
|
72 |
return results
|
73 |
|
74 |
+
st.title("Image Captioning Gallery")
|
75 |
|
76 |
# Sidebar for search functionality
|
77 |
with st.sidebar:
|