Spaces:
Running
Running
Eachan Johnson
commited on
Commit
·
ed1d3fc
1
Parent(s):
5911a8e
Update README, fix dropdown response
Browse files
README.md
CHANGED
@@ -11,7 +11,16 @@ pinned: false
|
|
11 |
license: mit
|
12 |
short_description: Predict MIC (with uncertainty) against bacterial species
|
13 |
models:
|
14 |
-
- scbirlab/spark-dv-fp-2503-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
datasets:
|
16 |
- scbirlab/thomas-2018-spark-wt
|
17 |
---
|
|
|
11 |
license: mit
|
12 |
short_description: Predict MIC (with uncertainty) against bacterial species
|
13 |
models:
|
14 |
+
- scbirlab/spark-dv-fp-2503-abau
|
15 |
+
- scbirlab/spark-dv-fp-2503-babo
|
16 |
+
- scbirlab/spark-dv-fp-2503-ecol
|
17 |
+
- scbirlab/spark-dv-fp-2503-ftul
|
18 |
+
- scbirlab/spark-dv-fp-2503-kpne
|
19 |
+
- scbirlab/spark-dv-fp-2503-paer
|
20 |
+
- scbirlab/spark-dv-fp-2503-saur
|
21 |
+
- scbirlab/spark-dv-fp-2503-spne
|
22 |
+
- scbirlab/spark-dv-fp-2503-yent
|
23 |
+
- scbirlab/spark-dv-fp-2503-ypes
|
24 |
datasets:
|
25 |
- scbirlab/thomas-2018-spark-wt
|
26 |
---
|
app.py
CHANGED
@@ -28,7 +28,7 @@ from schemist.tables import converter
|
|
28 |
import torch
|
29 |
from duvida.stateless.config import config
|
30 |
|
31 |
-
THEME = gr.themes.
|
32 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
33 |
|
34 |
CACHE = "./cache"
|
@@ -474,11 +474,11 @@ def _load_then_predict_then_download_then_reveal_plot(
|
|
474 |
return_pd=True,
|
475 |
)
|
476 |
print_err(df.head())
|
477 |
-
|
478 |
return (
|
479 |
df_gr,
|
480 |
download_table(df),
|
481 |
-
)
|
482 |
|
483 |
|
484 |
def _initial_setup():
|
@@ -730,6 +730,10 @@ if __name__ == "__main__":
|
|
730 |
],
|
731 |
)
|
732 |
with gr.Tab(f"Predict on structures from a file (max. {MAX_ROWS} rows, ≤ 2 species)"):
|
|
|
|
|
|
|
|
|
733 |
file_examples = gr.Examples(
|
734 |
examples=[
|
735 |
[
|
@@ -755,6 +759,7 @@ if __name__ == "__main__":
|
|
755 |
outputs=[
|
756 |
input_dataframe,
|
757 |
download,
|
|
|
758 |
],
|
759 |
cache_examples=True, ## appears to cause CSV load error
|
760 |
cache_mode="lazy",
|
@@ -821,11 +826,6 @@ if __name__ == "__main__":
|
|
821 |
outputs=[plot_button],
|
822 |
js=True,
|
823 |
)
|
824 |
-
|
825 |
-
plot_dropdowns = list(itertools.chain(
|
826 |
-
left_plot_inputs.values(),
|
827 |
-
right_plot_inputs.values(),
|
828 |
-
))
|
829 |
|
830 |
for dropdown in plot_dropdowns:
|
831 |
for e in (file_examples.load_input_event, go2_click_event):
|
|
|
28 |
import torch
|
29 |
from duvida.stateless.config import config
|
30 |
|
31 |
+
THEME = gr.themes.Default()
|
32 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
33 |
|
34 |
CACHE = "./cache"
|
|
|
474 |
return_pd=True,
|
475 |
)
|
476 |
print_err(df.head())
|
477 |
+
plot_dropdown = get_dropdown_options(df, _type="number")
|
478 |
return (
|
479 |
df_gr,
|
480 |
download_table(df),
|
481 |
+
) + (plot_dropdown, ) * 5
|
482 |
|
483 |
|
484 |
def _initial_setup():
|
|
|
730 |
],
|
731 |
)
|
732 |
with gr.Tab(f"Predict on structures from a file (max. {MAX_ROWS} rows, ≤ 2 species)"):
|
733 |
+
plot_dropdowns = list(itertools.chain(
|
734 |
+
left_plot_inputs.values(),
|
735 |
+
right_plot_inputs.values(),
|
736 |
+
))
|
737 |
file_examples = gr.Examples(
|
738 |
examples=[
|
739 |
[
|
|
|
759 |
outputs=[
|
760 |
input_dataframe,
|
761 |
download,
|
762 |
+
*plot_dropdowns,
|
763 |
],
|
764 |
cache_examples=True, ## appears to cause CSV load error
|
765 |
cache_mode="lazy",
|
|
|
826 |
outputs=[plot_button],
|
827 |
js=True,
|
828 |
)
|
|
|
|
|
|
|
|
|
|
|
829 |
|
830 |
for dropdown in plot_dropdowns:
|
831 |
for e in (file_examples.load_input_event, go2_click_event):
|