Spaces:
Running
Running
Update app.py
Browse files
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":
|
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']
|