Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from PIL import Image
|
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
model_id = "alibaba-pai/pai-diffusion-food-large-zh"
|
9 |
|
10 |
-
pipe_text2img = LDMZhTextToImagePipeline.from_pretrained(model_id
|
11 |
pipe_text2img = pipe_text2img.to(device)
|
12 |
|
13 |
def infer_text2img(prompt, guide, steps):
|
@@ -17,12 +17,11 @@ def infer_text2img(prompt, guide, steps):
|
|
17 |
|
18 |
with gr.Blocks() as demo:
|
19 |
examples = [
|
20 |
-
["็ช่็่"],
|
21 |
["ๅฐ็้ป็่"],
|
22 |
-
["
|
23 |
]
|
24 |
with gr.Row():
|
25 |
-
with gr.Column(scale=
|
26 |
image_out = gr.Image(label = '่พๅบ(output)')
|
27 |
with gr.Column(scale=1, ):
|
28 |
prompt = gr.Textbox(label = 'ๆ็คบ่ฏ(prompt)')
|
|
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
model_id = "alibaba-pai/pai-diffusion-food-large-zh"
|
9 |
|
10 |
+
pipe_text2img = LDMZhTextToImagePipeline.from_pretrained(model_id)
|
11 |
pipe_text2img = pipe_text2img.to(device)
|
12 |
|
13 |
def infer_text2img(prompt, guide, steps):
|
|
|
17 |
|
18 |
with gr.Blocks() as demo:
|
19 |
examples = [
|
|
|
20 |
["ๅฐ็้ป็่"],
|
21 |
+
["้ฉๅผ็ธ้ธก"]
|
22 |
]
|
23 |
with gr.Row():
|
24 |
+
with gr.Column(scale=0.5, ):
|
25 |
image_out = gr.Image(label = '่พๅบ(output)')
|
26 |
with gr.Column(scale=1, ):
|
27 |
prompt = gr.Textbox(label = 'ๆ็คบ่ฏ(prompt)')
|