rk3863 commited on
Commit
387dd7e
Β·
verified Β·
1 Parent(s): 958a364

Uploading food not food text classifier demo app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ from transformers import pipeline
7
 
8
  # Create function to use our model on given text
9
  def food_not_food_classifier(text: str) -> dict[str, float]:
10
- food_not_food_classifier = pipeline(task="text-classifcation",
11
  # Because our model is on Hugging Face already, we can pass in the model name directly
12
  model="mrdbourke/learn_hf_food_not_food_text_classifier-distilbert-base-uncased",
13
  device="cuda" if torch.cuda.is_available() else "cpu",
 
7
 
8
  # Create function to use our model on given text
9
  def food_not_food_classifier(text: str) -> dict[str, float]:
10
+ food_not_food_classifier = pipeline(task="text-classification",
11
  # Because our model is on Hugging Face already, we can pass in the model name directly
12
  model="mrdbourke/learn_hf_food_not_food_text_classifier-distilbert-base-uncased",
13
  device="cuda" if torch.cuda.is_available() else "cpu",