File size: 1,618 Bytes
bdf78cc
451adba
711dd33
bdf78cc
e3b015a
 
f5509d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cd0e00a
688213a
545c3fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import gradio as gr
import gradio.components as comp
import os

api_key = os.environ.get("HUGGINGFACE_API_KEY")

#model_list = [
#    "stabilityai/stable-diffusion-xl-base-0.9",
#    "stabilityai/stable-diffusion-2-1",
#    "stabilityai/stable-diffusion-xl-refiner-0.9",
#    "stabilityai/stable-diffusion-2-1-base",
#    "stabilityai/stable-diffusion-2",
#    "stabilityai/stable-diffusion-2-inpainting",
#    "stabilityai/stable-diffusion-x4-upscaler",
#    "stabilityai/stable-diffusion-2-depth",
#    "stabilityai/stable-diffusion-2-base",
#    "stabilityai/stable-diffusion-2-1-unclip",
#    "helenai/stabilityai-stable-diffusion-2-1-base-ov",
#    "helenai/stabilityai-stable-diffusion-2-1-ov",
#    "stabilityai/stable-diffusion-2-1-unclip-small"
#]

#default_model = "stabilityai/stable-diffusion-2"
#model_name = gr.inputs.Dropdown(choices=model_list, label="Select Model", default=default_model)

#def generate_image(text, default_model):
#    model = gr.load(default_model, source="huggingface", api_key=api_key)
#    return model.predict(text)

#input_text = gr.inputs.Textbox(label="Input Text")
#output_image = comp.Image(label="Generated Image")

#iface = gr.Interface(
#    fn=generate_image,
#    inputs=[input_text, default_model],
#    outputs=output_image,
#    title="Text to Image Generation",
#    description="Generate an image from input text using a Hugging Face model."
#)

#iface.launch()

title = ".mujo T ai art po O"
gr.Interface.load("models/stabilityai/stable-diffusion-2-1", title=title).launch()
#gr.load("models/stabilityai/stable-diffusion-2-1-base").launch(auth=("admin", "pass"))