Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,14 +24,14 @@ warnings.filterwarnings("ignore")
|
|
| 24 |
# Page setup
|
| 25 |
# ------------------------------
|
| 26 |
st.set_page_config(
|
| 27 |
-
page_title="ReactionT5
|
| 28 |
page_icon=None,
|
| 29 |
layout="wide",
|
| 30 |
)
|
| 31 |
|
| 32 |
-
st.title("ReactionT5
|
| 33 |
st.caption(
|
| 34 |
-
"Predict reaction products from your inputs using a pretrained ReactionT5 model."
|
| 35 |
)
|
| 36 |
|
| 37 |
with st.expander("How to format your CSV", expanded=False):
|
|
@@ -97,10 +97,7 @@ with st.sidebar:
|
|
| 97 |
model_help = "Recommended models for product prediction."
|
| 98 |
input_max_length_default = 400
|
| 99 |
output_max_length_default = 300
|
| 100 |
-
|
| 101 |
-
os.path.abspath(os.path.join(os.path.dirname(__file__), "task_forward"))
|
| 102 |
-
)
|
| 103 |
-
from train import preprocess_df
|
| 104 |
elif task == "retrosynthesis prediction":
|
| 105 |
model_options = [
|
| 106 |
"sagawa/ReactionT5v2-retrosynthesis",
|
|
@@ -109,12 +106,7 @@ with st.sidebar:
|
|
| 109 |
model_help = "Recommended models for retrosynthesis prediction."
|
| 110 |
input_max_length_default = 100
|
| 111 |
output_max_length_default = 400
|
| 112 |
-
|
| 113 |
-
os.path.abspath(
|
| 114 |
-
os.path.join(os.path.dirname(__file__), "task_retrosynthesis")
|
| 115 |
-
)
|
| 116 |
-
)
|
| 117 |
-
from train import preprocess_df
|
| 118 |
else: # yield prediction
|
| 119 |
model_options = ["sagawa/ReactionT5v2-yield"] # default as requested
|
| 120 |
model_help = "Default model for yield prediction."
|
|
|
|
| 24 |
# Page setup
|
| 25 |
# ------------------------------
|
| 26 |
st.set_page_config(
|
| 27 |
+
page_title="ReactionT5",
|
| 28 |
page_icon=None,
|
| 29 |
layout="wide",
|
| 30 |
)
|
| 31 |
|
| 32 |
+
st.title("ReactionT5")
|
| 33 |
st.caption(
|
| 34 |
+
"Predict reaction products, reactants, or yields from your inputs using a pretrained ReactionT5 model."
|
| 35 |
)
|
| 36 |
|
| 37 |
with st.expander("How to format your CSV", expanded=False):
|
|
|
|
| 97 |
model_help = "Recommended models for product prediction."
|
| 98 |
input_max_length_default = 400
|
| 99 |
output_max_length_default = 300
|
| 100 |
+
from task_forward.train import preprocess_df
|
|
|
|
|
|
|
|
|
|
| 101 |
elif task == "retrosynthesis prediction":
|
| 102 |
model_options = [
|
| 103 |
"sagawa/ReactionT5v2-retrosynthesis",
|
|
|
|
| 106 |
model_help = "Recommended models for retrosynthesis prediction."
|
| 107 |
input_max_length_default = 100
|
| 108 |
output_max_length_default = 400
|
| 109 |
+
from task_retrosynthesis.train import preprocess_df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
else: # yield prediction
|
| 111 |
model_options = ["sagawa/ReactionT5v2-yield"] # default as requested
|
| 112 |
model_help = "Default model for yield prediction."
|