Download Python from Noeies/Project06: direct link, hf CLI and curl.
- Browser
- Download file 422 Bytes
-
https://huggingface.co/spaces/Noeies/Project06/resolve/main/Python
- Command line
-
hf download hf://spaces/Noeies/Project06/Python
-
curl -L -o Python https://huggingface.co/spaces/Noeies/Project06/resolve/main/Python
422 Bytes
| import gradio as gr | |
| def classify_image(image): | |
| outputs = model(image) | |
| return outputs # return ถึงจะแสดงใน UI ของ Gradio | |
| gr.Interface(fn=classify_image, inputs=gr.Image(type="pil"), outputs="text").launch() | |
| preds = model(image) # สมมติเป็น logits | |
| pred_label = organ_labels[preds.argmax()] # แปลงเป็นชื่ออวัยวะ | |
| return pred_label |