Spaces:
Build error
Build error
Commit ·
5d34271
1
Parent(s): f5f6fef
update
Browse files196 unmodified lines197198199200201202203204179 unmodified lines38438538638738838939018 unmodified lines409410411412413414415196 unmodified linesuser_prompt = promptif slider_natural:user_prompt += ' <|endoftext|>'composed_prompt = tokenizer.decode(prompt)else:if len(stack) == 0:179 unmodified lineswith gr.Row():with gr.Column(scale=1):prompt = gr.Textbox(label="Input your prompt here.", placeholder="A beautiful city skyline stamp of Shanghai")keywords = gr.Textbox(label="(Optional) Input your keywords here. Keywords should bu seperate by / (e.g., keyword1/keyword2/...)", placeholder="keyword1/keyword2")# 这里加一个会话框18 unmodified linesslider_batch = gr.Slider(minimum=1, maximum=4, value=4, step=1, label="Batch size", info="The number of images to be sampled.")slider_temperature = gr.Slider(minimum=0.1, maximum=2, value=0.7, step=0.1, label="Temperature", info="Control the diversity of layout planner. Higher value indicates more diversity.")slider_natural = gr.Checkbox(label="Natural image generation", value=False, info="The text position and content info will not be incorporated.")slider_seed = gr.Slider(minimum=1, maximum=10000, label="Seed", randomize=True)button = gr.Button("Generate")with gr.Column(scale=1):196 unmodified lines197198199200201202203204179 unmodified lines38438538638738838939018 unmodified lines409410411412413414415196 unmodified linesuser_prompt = promptif slider_natural:user_prompt = f'<|startoftext|> {user_prompt} <|endoftext|>'composed_prompt = user_promptelse:if len(stack) == 0:179 unmodified lineswith gr.Row():with gr.Column(scale=1):prompt = gr.Textbox(label="Input your prompt here.", placeholder="A beautiful city skyline stamp of Shanghai")keywords = gr.Textbox(label="(Optional) Input your keywords here. Keywords should be seperated by / (e.g., keyword1/keyword2/...)", placeholder="keyword1/keyword2")# 这里加一个会话框18 unmodified linesslider_batch = gr.Slider(minimum=1, maximum=4, value=4, step=1, label="Batch size", info="The number of images to be sampled.")slider_temperature = gr.Slider(minimum=0.1, maximum=2, value=0.7, step=0.1, label="Temperature", info="Control the diversity of layout planner. Higher value indicates more diversity.")slider_natural = gr.Checkbox(label="Natural image generation", value=False, info="The text position and content info will not be incorporated.")# slider_seed = gr.Slider(minimum=1, maximum=10000, label="Seed", randomize=True)button = gr.Button("Generate")with gr.Column(scale=1):
app.py+4-4