Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +4 -4
src/streamlit_app.py
CHANGED
@@ -28,8 +28,8 @@ os.environ["STREAMLIT_WATCHER_TYPE"] = "none"
|
|
28 |
|
29 |
# Check if running on Streamlit Cloud vs locally
|
30 |
is_streamlit_cloud = os.environ.get('STREAMLIT_RUNTIME_ENV') == 'cloud'
|
31 |
-
MAX_ATOMS_CLOUD =
|
32 |
-
MAX_ATOMS_CLOUD_UMA =
|
33 |
|
34 |
# Set page configuration
|
35 |
st.set_page_config(
|
@@ -139,12 +139,12 @@ FAIRCHEM_MODELS = {
|
|
139 |
"ESEN SM Direct All OMOL": "esen-sm-direct-all-omol"
|
140 |
}
|
141 |
|
142 |
-
|
143 |
def get_mace_model(model_path, device, selected_default_dtype):
|
144 |
# Create a model of the specified type.
|
145 |
return mace_mp(model=model_path, device=device, default_dtype=selected_default_dtype)
|
146 |
|
147 |
-
|
148 |
def get_fairchem_model(selected_model, model_path, device, selected_task_type):
|
149 |
predictor = pretrained_mlip.get_predict_unit(model_path, device=device)
|
150 |
if selected_model == "UMA Small":
|
|
|
28 |
|
29 |
# Check if running on Streamlit Cloud vs locally
|
30 |
is_streamlit_cloud = os.environ.get('STREAMLIT_RUNTIME_ENV') == 'cloud'
|
31 |
+
MAX_ATOMS_CLOUD = 100 # Maximum atoms allowed on Streamlit Cloud
|
32 |
+
MAX_ATOMS_CLOUD_UMA = 50
|
33 |
|
34 |
# Set page configuration
|
35 |
st.set_page_config(
|
|
|
139 |
"ESEN SM Direct All OMOL": "esen-sm-direct-all-omol"
|
140 |
}
|
141 |
|
142 |
+
#@st.cache_resource
|
143 |
def get_mace_model(model_path, device, selected_default_dtype):
|
144 |
# Create a model of the specified type.
|
145 |
return mace_mp(model=model_path, device=device, default_dtype=selected_default_dtype)
|
146 |
|
147 |
+
#@st.cache_resource
|
148 |
def get_fairchem_model(selected_model, model_path, device, selected_task_type):
|
149 |
predictor = pretrained_mlip.get_predict_unit(model_path, device=device)
|
150 |
if selected_model == "UMA Small":
|