Spaces:
Running
Running
Eachan Johnson
commited on
Commit
·
e1979f9
1
Parent(s):
f9551c9
Set up eager example cache and progress bars
Browse files
app.py
CHANGED
@@ -197,8 +197,8 @@ def predict_one(
|
|
197 |
input_representation: str = 'smiles',
|
198 |
predict: Union[Iterable[str], str] = 'smiles',
|
199 |
extra_metrics: Optional[Union[Iterable[str], str]] = None,
|
200 |
-
return_pd: bool = False
|
201 |
-
|
202 |
):
|
203 |
prediction_df = convert_one(
|
204 |
strings=strings,
|
@@ -269,8 +269,8 @@ def predict_file(
|
|
269 |
predict: str = 'smiles',
|
270 |
predict2: Optional[str] = None,
|
271 |
extra_metrics: Optional[Union[Iterable[str], str]] = None,
|
272 |
-
return_pd: bool = False
|
273 |
-
|
274 |
):
|
275 |
predict = cast(predict, to=list)
|
276 |
if predict2 is not None and predict2 in MODELBOXES:
|
@@ -698,7 +698,7 @@ if __name__ == "__main__":
|
|
698 |
download_single,
|
699 |
],
|
700 |
cache_examples=True,
|
701 |
-
cache_mode="
|
702 |
)
|
703 |
|
704 |
for val in line_inputs.values():
|
@@ -754,7 +754,7 @@ if __name__ == "__main__":
|
|
754 |
*plot_dropdowns,
|
755 |
],
|
756 |
cache_examples=True, ## appears to cause CSV load error
|
757 |
-
cache_mode="
|
758 |
)
|
759 |
file_inputs["file"].render()
|
760 |
with gr.Row():
|
|
|
197 |
input_representation: str = 'smiles',
|
198 |
predict: Union[Iterable[str], str] = 'smiles',
|
199 |
extra_metrics: Optional[Union[Iterable[str], str]] = None,
|
200 |
+
return_pd: bool = False,
|
201 |
+
progress = gr.Progress(track_tqdm=True)
|
202 |
):
|
203 |
prediction_df = convert_one(
|
204 |
strings=strings,
|
|
|
269 |
predict: str = 'smiles',
|
270 |
predict2: Optional[str] = None,
|
271 |
extra_metrics: Optional[Union[Iterable[str], str]] = None,
|
272 |
+
return_pd: bool = False,
|
273 |
+
progress = gr.Progress(track_tqdm=True)
|
274 |
):
|
275 |
predict = cast(predict, to=list)
|
276 |
if predict2 is not None and predict2 in MODELBOXES:
|
|
|
698 |
download_single,
|
699 |
],
|
700 |
cache_examples=True,
|
701 |
+
cache_mode="eager",
|
702 |
)
|
703 |
|
704 |
for val in line_inputs.values():
|
|
|
754 |
*plot_dropdowns,
|
755 |
],
|
756 |
cache_examples=True, ## appears to cause CSV load error
|
757 |
+
cache_mode="eager",
|
758 |
)
|
759 |
file_inputs["file"].render()
|
760 |
with gr.Row():
|