chembfn-webui 1.0.0__py3-none-any.whl → 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of chembfn-webui might be problematic. Click here for more details.
- chembfn_webui/bin/app.py +8 -9
- chembfn_webui/cache/results.csv +1 -1
- chembfn_webui/lib/version.py +1 -1
- {chembfn_webui-1.0.0.dist-info → chembfn_webui-1.2.0.dist-info}/METADATA +16 -1
- {chembfn_webui-1.0.0.dist-info → chembfn_webui-1.2.0.dist-info}/RECORD +9 -9
- {chembfn_webui-1.0.0.dist-info → chembfn_webui-1.2.0.dist-info}/WHEEL +0 -0
- {chembfn_webui-1.0.0.dist-info → chembfn_webui-1.2.0.dist-info}/entry_points.txt +0 -0
- {chembfn_webui-1.0.0.dist-info → chembfn_webui-1.2.0.dist-info}/licenses/LICENSE +0 -0
- {chembfn_webui-1.0.0.dist-info → chembfn_webui-1.2.0.dist-info}/top_level.txt +0 -0
chembfn_webui/bin/app.py
CHANGED
|
@@ -42,7 +42,6 @@ from lib.version import __version__
|
|
|
42
42
|
|
|
43
43
|
vocabs = find_vocab()
|
|
44
44
|
models = find_model()
|
|
45
|
-
lora_selected = False # lora select flag
|
|
46
45
|
cache_dir = Path(__file__).parent.parent / "cache"
|
|
47
46
|
|
|
48
47
|
HTML_STYLE = gr.InputHTMLAttributes(
|
|
@@ -130,13 +129,9 @@ def select_lora(evt: gr.SelectData, prompt: str) -> str:
|
|
|
130
129
|
:return: new prompt string
|
|
131
130
|
:rtype: str
|
|
132
131
|
"""
|
|
133
|
-
global lora_selected
|
|
134
|
-
if lora_selected: # avoid double select
|
|
135
|
-
lora_selected = False
|
|
136
|
-
return prompt
|
|
137
132
|
selected_lora = evt.value
|
|
138
|
-
|
|
139
|
-
if evt.index[1] != 0:
|
|
133
|
+
exist_lora = parse_prompt(prompt)["lora"]
|
|
134
|
+
if evt.index[1] != 0 or selected_lora in exist_lora:
|
|
140
135
|
return prompt
|
|
141
136
|
if not prompt:
|
|
142
137
|
return f"<{selected_lora}:1>"
|
|
@@ -344,7 +339,11 @@ def run(
|
|
|
344
339
|
if len(sar_flag) == 1:
|
|
345
340
|
sar_flag = [sar_flag[0] for _ in range(len(weights))]
|
|
346
341
|
bfn = EnsembleChemBFN(base_model_dir, lora_dir, mlps, weights)
|
|
347
|
-
y =
|
|
342
|
+
y = (
|
|
343
|
+
[torch.tensor([i], dtype=torch.float32) for i in prompt_info["objective"]]
|
|
344
|
+
if prompt_info["objective"]
|
|
345
|
+
else None
|
|
346
|
+
)
|
|
348
347
|
if quantise == "on":
|
|
349
348
|
bfn.quantise()
|
|
350
349
|
if jited == "on":
|
|
@@ -616,7 +615,7 @@ def main() -> None:
|
|
|
616
615
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
617
616
|
)
|
|
618
617
|
parser.add_argument(
|
|
619
|
-
"--public", default=False, help="open to public", action="store_true"
|
|
618
|
+
"-P", "--public", default=False, help="open to public", action="store_true"
|
|
620
619
|
)
|
|
621
620
|
parser.add_argument("-V", "--version", action="version", version=__version__)
|
|
622
621
|
args = parser.parse_args()
|
chembfn_webui/cache/results.csv
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
CC1(CON)CCC(N)CC1
|
chembfn_webui/lib/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chembfn_webui
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: WebUI for ChemBFN
|
|
5
5
|
Home-page: https://github.com/Augus1999/ChemBFN-WebUI
|
|
6
6
|
Author: Nianze A. Tao
|
|
@@ -83,6 +83,21 @@ For example,
|
|
|
83
83
|
└───moses_selfies_vocab.txt
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
> Note:
|
|
87
|
+
>
|
|
88
|
+
> >The file `config.json` is automatically saved by CLI tool `Madmol` provided in `bayesianflow-for-chem` package. If you train models via Python API, you need to manually create that file for your models by filling in the tempate:
|
|
89
|
+
> >```json
|
|
90
|
+
> >{
|
|
91
|
+
> > "padding_index": 0,
|
|
92
|
+
> > "start_index": 1,
|
|
93
|
+
> > "end_index": 2,
|
|
94
|
+
> > "padding_strategy": "static",
|
|
95
|
+
> > "padding_length": PADDING_LENGTH,
|
|
96
|
+
> > "label": [LABEL_NAME_I, LABEL_NAME_II, ...],
|
|
97
|
+
> > "name": JOB_NAME
|
|
98
|
+
> >}
|
|
99
|
+
> >```
|
|
100
|
+
|
|
86
101
|
If placed correctly, all these files can be seen in the "model explorer" tab.
|
|
87
102
|
|
|
88
103
|
> You can use an external folder to host the models if it follows the same structure as [`chembfn_webui/model`](https://github.com/Augus1999/ChemBFN-WebUI/tree/main/chembfn_webui/model). See the next section for the method.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
chembfn_webui/__init__.py,sha256=AXUdd_PrlfVO56losFUP7A8XrqCDPylwRbTpe_WG3Uc,87
|
|
2
|
-
chembfn_webui/bin/app.py,sha256=
|
|
2
|
+
chembfn_webui/bin/app.py,sha256=ZyiAYiTFtTUnyrlENqXV9ByDKMi2WtMJPnAMcaKTidM,21612
|
|
3
3
|
chembfn_webui/cache/cache_file_here.txt,sha256=hi60T_q6Cf5WPtXuwe4CqjiWpaUqrczsmGMhKIUL--M,28
|
|
4
|
-
chembfn_webui/cache/results.csv,sha256=
|
|
4
|
+
chembfn_webui/cache/results.csv,sha256=CaKNQmiX5sbUCdqndjWzllSVi_s9sev8i3Nj0hLJ4LU,17
|
|
5
5
|
chembfn_webui/lib/utilities.py,sha256=ALPw-Evjd9DdsU_RQA6Zp2Gc6XnRR7Y_5fZrqG9azWo,7460
|
|
6
|
-
chembfn_webui/lib/version.py,sha256=
|
|
6
|
+
chembfn_webui/lib/version.py,sha256=EBNxY5E7vFFhf4osZe_mH3SbhzHBV9PM1CC9AQ_7PWc,138
|
|
7
7
|
chembfn_webui/model/base_model/place_base_model_here.txt,sha256=oa8_ILaAlWpTXICVDi-Y46_OahV7wB6Che6gbiEIh-c,39
|
|
8
8
|
chembfn_webui/model/lora/place_lora_folder_here.txt,sha256=YYOo0Cj278DyRcgVrCLa1f2Q-cqgNeMnelaLiA3Fuic,69
|
|
9
9
|
chembfn_webui/model/standalone_model/place_standalone_model_folder_here.txt,sha256=Dp42UscfI0Zp3SnvRv5vOfWiJZnxdY7rG3jo0kf86VM,80
|
|
10
10
|
chembfn_webui/model/vocab/place_vocabulary_file_here.txt,sha256=fLOINvZP2022oE7RsmfDjgyaw2yMi7glmdu_cTwmo88,28
|
|
11
|
-
chembfn_webui-1.
|
|
12
|
-
chembfn_webui-1.
|
|
13
|
-
chembfn_webui-1.
|
|
14
|
-
chembfn_webui-1.
|
|
15
|
-
chembfn_webui-1.
|
|
16
|
-
chembfn_webui-1.
|
|
11
|
+
chembfn_webui-1.2.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
12
|
+
chembfn_webui-1.2.0.dist-info/METADATA,sha256=5OXhUF4QixSdnnSLTJkrLxznBQ8-y8UhCfxA7TzuliA,6412
|
|
13
|
+
chembfn_webui-1.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
+
chembfn_webui-1.2.0.dist-info/entry_points.txt,sha256=fp8WTPybvwpeYKrUhTi456wwZbmCMJXN1TeFGpR1SlY,55
|
|
15
|
+
chembfn_webui-1.2.0.dist-info/top_level.txt,sha256=VdWt3Z7jhbB0pQO_mkRawnU5s75SBT9BV8fGaAIJTDI,14
|
|
16
|
+
chembfn_webui-1.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|