Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -108,9 +108,14 @@ if submitted:
|
|
108 |
with st.spinner(f'Creating the trainer class instance for {model_name}...'):
|
109 |
trainer = Trainer(config)
|
110 |
with st.spinner(f'Running inference function of {model_name} (this may take a while) ...'):
|
111 |
-
trainer.inference()
|
112 |
-
st.success(f"
|
113 |
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
with open(f'experiments/inference/{model_name}/inference_drugs.txt') as f:
|
116 |
inference_drugs = f.read()
|
|
|
108 |
with st.spinner(f'Creating the trainer class instance for {model_name}...'):
|
109 |
trainer = Trainer(config)
|
110 |
with st.spinner(f'Running inference function of {model_name} (this may take a while) ...'):
|
111 |
+
results = trainer.inference()
|
112 |
+
st.success(f"Inference of {model_name} took {results["runtime"]:.2f} seconds.")
|
113 |
|
114 |
+
with st.expander("Expand to see scores"):
|
115 |
+
|
116 |
+
st.write(f"Fraction valid: {results["fraction_valid"]}")
|
117 |
+
st.write(f"Uniqueness: {results["uniqueness"]}")
|
118 |
+
st.write(f"Novelty score: {results["novelty"]}")
|
119 |
|
120 |
with open(f'experiments/inference/{model_name}/inference_drugs.txt') as f:
|
121 |
inference_drugs = f.read()
|