import gradio as gr | |
# Load the model | |
demo = gr.load("models/TDN-M/East-asian-beauty") | |
# Example images | |
examples = [ | |
"ea1.png", | |
"ea2.png", | |
"ea3.png" | |
] | |
# Create a gallery to display example images | |
with gr.Row(): | |
for example in examples: | |
with gr.Column(): | |
gr.Image(value=example, shape=(512, 512)) # Adjust shape as needed | |
# Update the interface to include examples | |
demo = gr.Interface( | |
fn=demo.predict, | |
inputs=demo.input_components, | |
outputs=demo.output_components, | |
examples=examples, | |
title="TDN-M/East-asian-beauty", | |
description="Demo for TDN-M/East-asian-beauty model.", | |
) | |
demo.launch() |