Xenova HF staff commited on
Commit
caf4154
1 Parent(s): 8b8f6aa

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +55 -17
index.html CHANGED
@@ -1,19 +1,57 @@
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>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Gradio-Lite: Serverless Gradio Running Entirely in Your Browser</title>
7
+ <meta name="description" content="Gradio-Lite: Serverless Gradio Running Entirely in Your Browser">
8
+
9
+ <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.js"></script>
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@gradio/lite/dist/lite.css" />
11
+
12
+ <style>
13
+ html, body {
14
+ margin: 0;
15
+ padding: 0;
16
+ height: 100%;
17
+ }
18
+ </style>
19
+ </head>
20
+ <body>
21
+ <gradio-lite>
22
+ <gradio-file name="app.py" entrypoint>
23
+ import gradio as gr
24
+
25
+ from filters import as_gray
26
+
27
+ def process(input_image):
28
+ output_image = as_gray(input_image)
29
+ return output_image
30
+
31
+ demo = gr.Interface(
32
+ process,
33
+ "image",
34
+ "image",
35
+ examples=["lion.jpg", "logo.png"],
36
+ )
37
+
38
+ demo.launch()
39
+ </gradio-file>
40
+
41
+ <gradio-file name="filters.py">
42
+ from skimage.color import rgb2gray
43
+
44
+ def as_gray(image):
45
+ return rgb2gray(image)
46
+ </gradio-file>
47
+
48
+ <gradio-file name="lion.jpg" url="https://raw.githubusercontent.com/gradio-app/gradio/main/gradio/test_data/lion.jpg" />
49
+ <gradio-file name="logo.png" url="https://raw.githubusercontent.com/gradio-app/gradio/main/guides/assets/logo.png" />
50
+
51
+ <gradio-requirements>
52
+ # Same syntax as requirements.txt
53
+ scikit-image
54
+ </gradio-requirements>
55
+ </gradio-lite>
56
+ </body>
57
+ </html>