adamNLP commited on
Commit
85f5ce5
Β·
verified Β·
1 Parent(s): 2c5ad51

Upload food not food text classifier demo from notebook

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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