File size: 531 Bytes
9cea247
0a5bf53
3908e27
0a5bf53
9cea247
0a5bf53
 
 
 
 
3ec475e
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from huggingface_hub import snapshot_download
import gradio as gr

# Download the model to cache or local dir
local_dir = snapshot_download(repo_id="cloudqi/cqi_text_to_image_pt_v0")

def show_path():
    return f"Model downloaded to: {local_dir}"

gr.Interface(fn=show_path, inputs=None, outputs="text").launch()
demo.launch(share=True)

from diffusers import DiffusionPipeline

pipe = DiffusionPipeline.from_pretrained("cloudqi/cqi_text_to_image_pt_v0")

prompt = "Gato em alta qualidade na neve\n"
image = pipe(prompt).images[0]