Docfile commited on
Commit
c155fff
·
verified ·
1 Parent(s): 967ec2e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +29 -17
index.html CHANGED
@@ -1,19 +1,31 @@
1
  <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
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>