Spaces:
Running
Running
jannisborn
commited on
Commit
•
a29f8e7
1
Parent(s):
45d9693
update
Browse files
app.py
CHANGED
@@ -84,7 +84,10 @@ def regression_transformer(
|
|
84 |
)
|
85 |
model = RegressionTransformer(configuration=config, target=target)
|
86 |
samples = list(model.sample(number_of_samples))
|
87 |
-
|
|
|
|
|
|
|
88 |
correct_samples = [(s, p) for s, p in samples if "." in s]
|
89 |
while len(correct_samples) < number_of_samples:
|
90 |
samples = list(model.sample(number_of_samples))
|
@@ -96,8 +99,7 @@ def regression_transformer(
|
|
96 |
]
|
97 |
)
|
98 |
samples = correct_samples
|
99 |
-
|
100 |
-
# pass
|
101 |
if task == "Predict":
|
102 |
return draw_grid_predict(samples[0], target, domain=algorithm.split(":")[0])
|
103 |
else:
|
|
|
84 |
)
|
85 |
model = RegressionTransformer(configuration=config, target=target)
|
86 |
samples = list(model.sample(number_of_samples))
|
87 |
+
polymer = isinstance(
|
88 |
+
config.generator.tokenizer.text_tokenizer, PolymerGraphTokenizer
|
89 |
+
)
|
90 |
+
if algorithm_version == "rop_catalyst" and task == "Generate":
|
91 |
correct_samples = [(s, p) for s, p in samples if "." in s]
|
92 |
while len(correct_samples) < number_of_samples:
|
93 |
samples = list(model.sample(number_of_samples))
|
|
|
99 |
]
|
100 |
)
|
101 |
samples = correct_samples
|
102 |
+
|
|
|
103 |
if task == "Predict":
|
104 |
return draw_grid_predict(samples[0], target, domain=algorithm.split(":")[0])
|
105 |
else:
|