YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Cham Disease Classifier

์ด ๋ชจ๋ธ์€ ์งˆ๋ณ‘์„ ๋ถ„๋ฅ˜ํ•˜๋Š” ONNX ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค.

๋ชจ๋ธ ์ •๋ณด

  • ๋ชจ๋ธ ํ˜•์‹: ONNX
  • ์ž…๋ ฅ: [์ž…๋ ฅ ํ˜•์‹ ์„ค๋ช…]
  • ์ถœ๋ ฅ: [์ถœ๋ ฅ ํ˜•์‹ ์„ค๋ช…]

์‚ฌ์šฉ ๋ฐฉ๋ฒ•

import requests import base64 import json

API_URL = "https://api-inference.huggingface.co/models/YooGyu/cham" HEADERS = {"Authorization": "Bearer YOUR_API_TOKEN"}

def encode_image(image_path): """์ด๋ฏธ์ง€๋ฅผ Base64๋กœ ๋ณ€ํ™˜""" with open(image_path, "rb") as image_file: return base64.b64encode(image_file.read()).decode("utf-8")

def query(image_path): """API ์š”์ฒญ ๋ฐ ์‘๋‹ต ์ฒ˜๋ฆฌ""" encoded_image = encode_image(image_path) payload = json.dumps({"inputs": encoded_image})

response = requests.post(API_URL, headers=HEADERS, data=payload)
return response.json()

์˜ˆ์‹œ ์‚ฌ์šฉ๋ฒ•

image_path = "testimage/cham.jpg" output = query(image_path)

print(output)

๋ผ์ด์„ผ์Šค

[๋ผ์ด์„ผ์Šค ์ •๋ณด]

Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support