ayajoharji commited on
Commit
969899b
·
verified ·
1 Parent(s): 521a5df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import numpy as np
2
  import gradio as gr
3
  from sklearn.cluster import KMeans
@@ -10,7 +13,6 @@ from transformers import (
10
  from PIL import Image, ImageDraw
11
  import requests
12
  from io import BytesIO
13
-
14
  # Load Hugging Face models globally
15
  print("Loading Hugging Face models...")
16
  processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")
 
1
+ # Install necessary libraries
2
+ !pip install torch transformers gradio Pillow scikit-learn requests
3
+
4
  import numpy as np
5
  import gradio as gr
6
  from sklearn.cluster import KMeans
 
13
  from PIL import Image, ImageDraw
14
  import requests
15
  from io import BytesIO
 
16
  # Load Hugging Face models globally
17
  print("Loading Hugging Face models...")
18
  processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-base")