P01yH3dr0n commited on
Commit
7dfeb58
1 Parent(s): 5a09a99

adjust for public use

Browse files
.gitignore CHANGED
@@ -1,5 +1,4 @@
1
  data_client/
2
- config.toml
3
  tagcomplete/tags/demo-chants.json
4
 
5
  # Byte-compiled / optimized / DLL files
 
1
  data_client/
 
2
  tagcomplete/tags/demo-chants.json
3
 
4
  # Byte-compiled / optimized / DLL files
README.md CHANGED
@@ -7,6 +7,6 @@ sdk: gradio
7
  sdk_version: 4.38.1
8
  app_file: app.py
9
  pinned: false
10
- datasets: [P01yH3dr0n/naimages]
11
  ---
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
7
  sdk_version: 4.38.1
8
  app_file: app.py
9
  pinned: false
10
+ datasets: [P01yH3dr0n/impart-images]
11
  ---
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -35,7 +35,7 @@ def change_schedule(sampler):
35
  return gr.Dropdown(value="karras", interactive=True)
36
 
37
  def control_ui():
38
- prompt = gr.TextArea(value="{breast expansion},{gigantic breasts},[artist:ningen_mame],artist:ciloranko,[artist:sho_(sho_lwlw)],[artist:foifoi (marfoyfoyfoy)],1girl,skinny,narrow waist,loli,child,solo,", elem_id='txt2img_prompt', label="提示词", lines=3)
39
  quality_tags = gr.TextArea(
40
  elem_id='txt2img_qua_prompt', label="质量词", lines=1,
41
  value=client_config['default_quality'],
@@ -169,7 +169,7 @@ def rename_save_img(path, payload, save):
169
  today_path = os.path.join(save_path, today)
170
  os.makedirs(today_path, exist_ok=True)
171
  shutil.copy(renamed_path, os.path.join(today_path, filename))
172
- api.upload_folder(folder_path=today_path, path_in_repo=today_path, repo_id="P01yH3dr0n/naimages", repo_type="dataset", token=os.environ.get("hf_token"))
173
  return renamed_path
174
 
175
  def update_btn_cost(w, h, s, sm, dyn, i2i_img, i2i_str, inp_img, selection):
@@ -283,7 +283,7 @@ def ui():
283
 
284
 
285
  if __name__ == '__main__':
286
- snapshot_download(repo_id="P01yH3dr0n/naimages", repo_type="dataset", local_dir="./", token=os.environ.get("hf_token"), allow_patterns="*.png")
287
  website = ui()
288
  website.queue(default_concurrency_limit=5)
289
  website.launch(auth=(os.environ.get('account'), os.environ.get('password')), allowed_paths=['tagcomplete'], debug=True)
 
35
  return gr.Dropdown(value="karras", interactive=True)
36
 
37
  def control_ui():
38
+ prompt = gr.TextArea(elem_id='txt2img_prompt', label="提示词", lines=3)
39
  quality_tags = gr.TextArea(
40
  elem_id='txt2img_qua_prompt', label="质量词", lines=1,
41
  value=client_config['default_quality'],
 
169
  today_path = os.path.join(save_path, today)
170
  os.makedirs(today_path, exist_ok=True)
171
  shutil.copy(renamed_path, os.path.join(today_path, filename))
172
+ api.upload_folder(folder_path=today_path, path_in_repo=today_path, repo_id="P01yH3dr0n/impart-images", repo_type="dataset", token=os.environ.get("hf_token"))
173
  return renamed_path
174
 
175
  def update_btn_cost(w, h, s, sm, dyn, i2i_img, i2i_str, inp_img, selection):
 
283
 
284
 
285
  if __name__ == '__main__':
286
+ snapshot_download(repo_id="P01yH3dr0n/impart-images", repo_type="dataset", local_dir="./", token=os.environ.get("hf_token"), allow_patterns="*.png")
287
  website = ui()
288
  website.queue(default_concurrency_limit=5)
289
  website.launch(auth=(os.environ.get('account'), os.environ.get('password')), allowed_paths=['tagcomplete'], debug=True)
config.toml CHANGED
@@ -23,4 +23,4 @@
23
  end_point_pswd = "123456"
24
  token = ""
25
  default_quality = "best quality, amazing quality, very aesthetic, absurdres"
26
- default_neg = "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, weibo username, censored"
 
23
  end_point_pswd = "123456"
24
  token = ""
25
  default_quality = "best quality, amazing quality, very aesthetic, absurdres"
26
+ default_neg = "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]"
images_history.py CHANGED
@@ -41,7 +41,7 @@ def del_img(index, folder, page):
41
  page = ceil(len(img_list)/num_of_imgs_per_page)
42
  res = img_list[(page - 1)*num_of_imgs_per_page: page*num_of_imgs_per_page]
43
  os.remove(res[index])
44
- api.delete_file(path_in_repo=res[index], repo_id="P01yH3dr0n/naimages", repo_type="dataset", token=os.environ.get("hf_token"))
45
  res.pop(index)
46
  return gr.Gallery(value=res, selected_index=None)
47
 
 
41
  page = ceil(len(img_list)/num_of_imgs_per_page)
42
  res = img_list[(page - 1)*num_of_imgs_per_page: page*num_of_imgs_per_page]
43
  os.remove(res[index])
44
+ api.delete_file(path_in_repo=res[index], repo_id="P01yH3dr0n/impart-images", repo_type="dataset", token=os.environ.get("hf_token"))
45
  res.pop(index)
46
  return gr.Gallery(value=res, selected_index=None)
47
 
tagcomplete/javascript/__globals.js CHANGED
@@ -17,10 +17,9 @@ var TAC_CFG = {
17
  delayTime: 100,
18
  includeEmbeddingsInNormalResults: false,
19
  showWikiLinks: true,
20
- showExtraNetworkPreviews: false,
21
  // Insertion related settings
22
  replaceUnderscores: true,
23
- escapeParentheses: true,
24
  appendComma: true,
25
  appendSpace: true,
26
  alwaysSpaceAtEnd: false,
@@ -31,11 +30,13 @@ var TAC_CFG = {
31
  },
32
  // Translation settings
33
  translation: {
34
- searchByTranslation: false,
 
 
35
  },
36
  // Extra file settings
37
  extra: {
38
- extraFile: "danbooru-0-zh.csv",
39
  addMode: "Insert before"
40
  },
41
  // Chant file settings
 
17
  delayTime: 100,
18
  includeEmbeddingsInNormalResults: false,
19
  showWikiLinks: true,
 
20
  // Insertion related settings
21
  replaceUnderscores: true,
22
+ escapeParentheses: false,
23
  appendComma: true,
24
  appendSpace: true,
25
  alwaysSpaceAtEnd: false,
 
30
  },
31
  // Translation settings
32
  translation: {
33
+ searchByTranslation: true,
34
+ oldFormat: false,
35
+ translationFile: 'zh_cn.csv'
36
  },
37
  // Extra file settings
38
  extra: {
39
+ extraFile: "extra-quality-tags.csv",
40
  addMode: "Insert before"
41
  },
42
  // Chant file settings