Upload food not food text classifier demo from notebook
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from transformers import pipeline
|
|
9 |
def food_not_food_classifier(text: str) -> Dict[str, float]:
|
10 |
# 2. Setup food not food text classifier
|
11 |
food_not_food_classifier_pipeline = pipeline(task="text-classification",
|
12 |
-
model="adamNLP/learn_hf_food_not_food_text_classifier-distilbert-base-uncased"
|
13 |
batch_size=32,
|
14 |
device="cuda" if torch.cuda.is_available() else "cpu",
|
15 |
top_k=None) # top_k=None => return all possible labels
|
|
|
9 |
def food_not_food_classifier(text: str) -> Dict[str, float]:
|
10 |
# 2. Setup food not food text classifier
|
11 |
food_not_food_classifier_pipeline = pipeline(task="text-classification",
|
12 |
+
model="adamNLP/learn_hf_food_not_food_text_classifier-distilbert-base-uncased",
|
13 |
batch_size=32,
|
14 |
device="cuda" if torch.cuda.is_available() else "cpu",
|
15 |
top_k=None) # top_k=None => return all possible labels
|