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

Uploading food not food text classifier demo app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ from typing import TypedDict
6
  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",
 
6
  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",