Spaces:
Sleeping
Sleeping
Create predict.js
Browse files- predict.js +11 -0
predict.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { Client } from "@gradio/client";
|
| 2 |
+
|
| 3 |
+
const response_0 = await fetch("undefined");
|
| 4 |
+
const exampleVideo = await response_0.blob();
|
| 5 |
+
|
| 6 |
+
const client = await Client.connect("TashiKP/PotholeDetect");
|
| 7 |
+
const result = await client.predict("/predict", {
|
| 8 |
+
video: exampleVideo,
|
| 9 |
+
});
|
| 10 |
+
|
| 11 |
+
console.log(result.data);
|