P01yH3dr0n commited on
Commit
b94b459
1 Parent(s): e893ce4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -18,13 +18,13 @@ def get_count():
18
  return "Total number of today's image generation: " + str(today_count)
19
 
20
  def control_ui():
21
- prompt = gr.TextArea(label="Prompt", lines=3, value="{breast expansion},{gigantic breasts},[artist:ningen_mame],artist:ciloranko,[artist:sho_(sho_lwlw)],[artist:foifoi (marfoyfoyfoy)],1girl,skinny,narrow waist,")
22
  quality_tags = gr.TextArea(
23
- label="Quality Tags", lines=1,
24
  value="best quality, amazing quality, very aesthetic, absurdres",
25
  )
26
  neg_prompt = gr.TextArea(
27
- label="Negative Prompt", lines=1,
28
  value="wide hips,thick thighs,plump,lowres, {bad}, error, fewer, extra, missing, worst quality, jpeg artifacts, bad quality, watermark, unfinished, displeasing, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract],pubic hair",
29
  )
30
  with gr.Row():
@@ -144,7 +144,10 @@ def util_ui():
144
  return page, png2main, items, info, image
145
 
146
  def ui():
147
- with gr.Blocks(title="NAI Client") as website:
 
 
 
148
  with gr.Tabs():
149
  with gr.TabItem("Main", elem_id="client_ui_main"):
150
  _, paras = main_ui()
@@ -163,4 +166,4 @@ def ui():
163
  if __name__ == '__main__':
164
  website = ui()
165
  website.queue()
166
- website.launch(auth=(os.environ.get('account'), os.environ.get('password')))
 
18
  return "Total number of today's image generation: " + str(today_count)
19
 
20
  def control_ui():
21
+ prompt = gr.TextArea(elem_id='txt2img_prompt', label="Prompt", lines=3, value="{breast expansion},{gigantic breasts},[artist:ningen_mame],artist:ciloranko,[artist:sho_(sho_lwlw)],[artist:foifoi (marfoyfoyfoy)],1girl,skinny,narrow waist,")
22
  quality_tags = gr.TextArea(
23
+ elem_id='txt2img_qua_prompt', label="Quality Tags", lines=1,
24
  value="best quality, amazing quality, very aesthetic, absurdres",
25
  )
26
  neg_prompt = gr.TextArea(
27
+ elem_id='txt2img_neg_prompt', label="Negative Prompt", lines=1,
28
  value="wide hips,thick thighs,plump,lowres, {bad}, error, fewer, extra, missing, worst quality, jpeg artifacts, bad quality, watermark, unfinished, displeasing, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract],pubic hair",
29
  )
30
  with gr.Row():
 
144
  return page, png2main, items, info, image
145
 
146
  def ui():
147
+ head = ''
148
+ for f in sorted(os.listdir('./tagcomplete/javascript')):
149
+ head += f'<script type="text/javascript" src="file=tagcomplete/javascript/{f}"></script>\n'
150
+ with gr.Blocks(title="NAI Client", head=head) as website:
151
  with gr.Tabs():
152
  with gr.TabItem("Main", elem_id="client_ui_main"):
153
  _, paras = main_ui()
 
166
  if __name__ == '__main__':
167
  website = ui()
168
  website.queue()
169
+ website.launch(auth=(os.environ.get('account'), os.environ.get('password')), allowed_paths=['tagcomplete'])