SSahas commited on
Commit
fd359ef
·
1 Parent(s): 7cc5bde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -11,6 +11,9 @@ nltk.download('wordnet')
11
  processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
12
  model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base")
13
 
 
 
 
14
  def hashtag_generator(image):
15
  raw_image = Image.fromarray(image).convert('RGB')
16
  inputs = processor(raw_image, return_tensors="pt")
 
11
  processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
12
  model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-base")
13
 
14
+ stopwords = nltk.corpus.stopwords.words('english')
15
+ wn = nltk.WordNetLemmatizer()
16
+
17
  def hashtag_generator(image):
18
  raw_image = Image.fromarray(image).convert('RGB')
19
  inputs = processor(raw_image, return_tensors="pt")