Update app.py
Browse files
app.py
CHANGED
@@ -1,35 +1,3 @@
|
|
1 |
-
|
2 |
|
3 |
-
|
4 |
-
demo = gr.load("models/TDN-M/East-asian-beauty")
|
5 |
-
|
6 |
-
# Example images
|
7 |
-
examples = [
|
8 |
-
"ea1.png",
|
9 |
-
"ea2.png",
|
10 |
-
"ea3.png"
|
11 |
-
]
|
12 |
-
|
13 |
-
# Create a gallery to display example images
|
14 |
-
with gr.Row():
|
15 |
-
for example in examples:
|
16 |
-
with gr.Column():
|
17 |
-
gr.Gallery(value=[example], label="Example", elem_id="gallery").render() # Add elem_id
|
18 |
-
|
19 |
-
# Update the interface to include examples and CSS
|
20 |
-
demo = gr.Interface(
|
21 |
-
fn=demo.predict,
|
22 |
-
inputs=demo.input_components,
|
23 |
-
outputs=demo.output_components,
|
24 |
-
examples=examples,
|
25 |
-
title="TDN-M/East-asian-beauty",
|
26 |
-
description="Demo for TDN-M/East-asian-beauty model.",
|
27 |
-
css="""
|
28 |
-
#gallery .gallery-item {
|
29 |
-
height: 512px;
|
30 |
-
width: 512px;
|
31 |
-
}
|
32 |
-
"""
|
33 |
-
)
|
34 |
-
|
35 |
-
demo.launch()
|
|
|
1 |
+
mport gradio as gr
|
2 |
|
3 |
+
gr.load("models/TDN-M/East-asian-beauty").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|