Prajwall11 commited on
Commit
234a881
·
verified ·
1 Parent(s): a26f13d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ api_key = 'XshljGSwf/pq3GcgBdHtOg==G9X2wnPqW5c6vp0F'
11
  def identify_image(image_path):
12
  """Identify the food item in the image."""
13
  API_URL = "https://api-inference.huggingface.co/models/nateraw/food"
14
- headers = {"Authorization": huggingface_api}
15
  image = Image.open(image_path)
16
  response = requests.post(API_URL, headers=headers, data=image)
17
  return response.json()[0]['label']
 
11
  def identify_image(image_path):
12
  """Identify the food item in the image."""
13
  API_URL = "https://api-inference.huggingface.co/models/nateraw/food"
14
+ headers = {"Authorization": api_key}
15
  image = Image.open(image_path)
16
  response = requests.post(API_URL, headers=headers, data=image)
17
  return response.json()[0]['label']