Spaces:
Sleeping
Sleeping
สร้าง app.py สำหรับ Image Classification
Browse files
app.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { InferenceClient } from "@huggingface/inference";
|
| 2 |
+
|
| 3 |
+
const inference = new InferenceClient(HF_TOKEN);
|
| 4 |
+
await inference.imageClassification({
|
| 5 |
+
data: await (await fetch("https://picsum.photos/300/300")).blob(),
|
| 6 |
+
model: "microsoft/resnet-50",
|
| 7 |
+
});
|