Spaces:
Sleeping
Sleeping
phind
commited on
Commit
·
ab85c42
1
Parent(s):
9170c17
fix bugs
Browse files
app.py
CHANGED
@@ -3,12 +3,12 @@ from transformers import pipeline
|
|
3 |
from PIL import Image
|
4 |
|
5 |
@st.cache_resourse
|
6 |
-
def get_model_hotdog_classification_pipeline()
|
7 |
pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
|
8 |
return pipeline
|
9 |
|
10 |
@st.cache_resourse
|
11 |
-
def get_model_image_captioning_pipeline()
|
12 |
captioner = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
|
13 |
return captioner
|
14 |
|
|
|
3 |
from PIL import Image
|
4 |
|
5 |
@st.cache_resourse
|
6 |
+
def get_model_hotdog_classification_pipeline():
|
7 |
pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
|
8 |
return pipeline
|
9 |
|
10 |
@st.cache_resourse
|
11 |
+
def get_model_image_captioning_pipeline():
|
12 |
captioner = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
|
13 |
return captioner
|
14 |
|