Update index.html
Browse files- index.html +29 -17
index.html
CHANGED
@@ -1,19 +1,31 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Gradio Integration Example</title>
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<h1>Gradio Integration</h1>
|
11 |
+
<!-- Votre balise script pour le code JavaScript -->
|
12 |
+
<script type="module">
|
13 |
+
import { client } from "@gradio/client";
|
14 |
+
|
15 |
+
async function runExample() {
|
16 |
+
const response_0 = await fetch("https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png");
|
17 |
+
const exampleImage = await response_0.blob();
|
18 |
+
|
19 |
+
const app = await client("https://docfile-mariam-physique1.hf.space/--replicas/ptlbx/");
|
20 |
+
const result = await app.predict("/predict", [
|
21 |
+
"Hello!!", // string in 'pro' Textbox component
|
22 |
+
exampleImage, // blob in 'image' Image component
|
23 |
+
]);
|
24 |
+
|
25 |
+
console.log(result.data);
|
26 |
+
}
|
27 |
+
|
28 |
+
runExample();
|
29 |
+
</script>
|
30 |
+
</body>
|
31 |
</html>
|