chywang commited on
Commit
be9a42a
โ€ข
1 Parent(s): 5fc1c76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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, use_auth_token="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")
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=1, ):
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)')