| from huggingface_hub import InferenceClient | |
| from dotenv import load_dotenv | |
| import os | |
| load_dotenv() | |
| client = InferenceClient( | |
| provider="hf-inference", | |
| api_key=os.getenv("TOKEN"), | |
| ) | |
| output = client.image_segmentation( | |
| "https://s1.ppllstatics.com/mujerhoy/www/multimedia/202306/02/media/cortadas/[email protected]", | |
| model="jonathandinu/face-parsing" | |
| ) | |
| print(output) | |