TashiKP commited on
Commit
1149617
·
verified ·
1 Parent(s): 4cf2af4

Create predict.js

Browse files
Files changed (1) hide show
  1. 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);