File size: 556 Bytes
5a9c9b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
from vae import vae
from morphing import morphing
from model import ConvVAE

model = ConvVAE.from_pretrained(
    model_id="BioMike/classical_portrait_vae",
    cache_dir="./model_cache",
    map_location="cpu",
    strict=True
).eval()


demo = gr.TabbedInterface([vae, morphing],
                          ["Image to Portrait", "Image to Image (Morphing)"]
                          title="CLassical Portraits VAE",
                          theme=gr.themes.Base())

demo.queue()
demo.launch(debug=True, share=True)