forked from enviPath/enviPy
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
493990566a | ||
|
|
7a6d8d7aec |
+17
-1
@@ -29,6 +29,8 @@ class SamplingAlgorithm(enum.Enum):
|
||||
class BB4GConfig(EnviPyModel):
|
||||
sampling_algorithm: SamplingAlgorithm = SamplingAlgorithm.EXACT
|
||||
cutoff: int = -5
|
||||
model: str = "rat"
|
||||
mode: str | None = None
|
||||
|
||||
class UI:
|
||||
title = "BB4G Configuration"
|
||||
@@ -44,6 +46,18 @@ class BB4GConfig(EnviPyModel):
|
||||
order=2,
|
||||
placeholder="If unset defaults to -5"
|
||||
)
|
||||
model = UIConfig(
|
||||
widget=WidgetType.TEXT,
|
||||
label="BB4G Model",
|
||||
order=3,
|
||||
placeholder="If unset defaults to rat"
|
||||
)
|
||||
mode = UIConfig(
|
||||
widget=WidgetType.TEXT,
|
||||
label="BB4G Mode",
|
||||
order=4,
|
||||
placeholder="If unset defaults to None"
|
||||
)
|
||||
|
||||
|
||||
# Once stable these will be exposed by enviPy-plugins lib
|
||||
@@ -127,7 +141,7 @@ class BB4G(Classifier):
|
||||
def run(self, eP: EnviPyDTO, *args, **kwargs) -> RunResult:
|
||||
|
||||
# Ensure Service is running
|
||||
self.start()
|
||||
# self.start()
|
||||
|
||||
smiles = [c.smiles for c in eP.get_compounds()]
|
||||
preds = self._post(smiles)
|
||||
@@ -167,6 +181,8 @@ class BB4G(Classifier):
|
||||
"smiles": smi,
|
||||
"sampling_alg": self.config.sampling_algorithm.value,
|
||||
"cutoff": self.config.cutoff,
|
||||
"model": self.config.model,
|
||||
"mode": self.config.mode,
|
||||
}
|
||||
|
||||
retries = 0
|
||||
|
||||
@@ -283,15 +283,6 @@
|
||||
{{ ne.content }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<a href="{{ ne.url }}" class="btn btn-primary btn-sm w-full group-hover:btn-active mt-1">
|
||||
Read Full
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
|
||||
<polyline points="15 3 21 3 21 9"></polyline>
|
||||
<line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user