Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +23 -23
src/streamlit_app.py
CHANGED
@@ -21,31 +21,31 @@ import subprocess
|
|
21 |
import sys
|
22 |
import pkg_resources
|
23 |
|
24 |
-
try:
|
25 |
-
|
26 |
-
except Exception as e:
|
27 |
-
|
28 |
|
29 |
-
try:
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
except ImportError as e:
|
34 |
-
|
35 |
-
|
36 |
-
# Define version threshold
|
37 |
-
required_version = "2.0.0"
|
38 |
|
39 |
-
try:
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
except pkg_resources.DistributionNotFound:
|
47 |
-
|
48 |
-
|
49 |
|
50 |
|
51 |
from huggingface_hub import login
|
|
|
21 |
import sys
|
22 |
import pkg_resources
|
23 |
|
24 |
+
# try:
|
25 |
+
# subprocess.check_call([sys.executable, "-m", "pip", "install", "mattersim"])
|
26 |
+
# except Exception as e:
|
27 |
+
# print(f"Error during installation of mattersim: {e}")
|
28 |
|
29 |
+
# try:
|
30 |
+
# from mattersim.forcefield import MatterSimCalculator
|
31 |
+
# mattersim_available = True
|
32 |
+
# print("\n\n\n\n\n\n\nSuccessfully imported MatterSimCalculator.\n\n\n\n\n\n\n\n\n\n")
|
33 |
+
# except ImportError as e:
|
34 |
+
# print(f"Failed to import MatterSimCalculator: {e} \n\n\n\n\n\n\n\n")
|
35 |
+
# mattersim_available = False
|
36 |
+
# # Define version threshold
|
37 |
+
# required_version = "2.0.0"
|
38 |
|
39 |
+
# try:
|
40 |
+
# installed_version = pkg_resources.get_distribution("numpy").version
|
41 |
+
# if pkg_resources.parse_version(installed_version) >= pkg_resources.parse_version(required_version):
|
42 |
+
# print(f"numpy version {installed_version} >= {required_version}. Installing numpy<2.0.0...")
|
43 |
+
# subprocess.check_call([sys.executable, "-m", "pip", "install", "numpy<2.0.0"])
|
44 |
+
# else:
|
45 |
+
# print(f"numpy version {installed_version} is already < {required_version}. No action needed.")
|
46 |
+
# except pkg_resources.DistributionNotFound:
|
47 |
+
# print("numpy is not installed. Installing numpy<2.0.0...")
|
48 |
+
# subprocess.check_call([sys.executable, "-m", "pip", "install", "numpy<2.0.0"])
|
49 |
|
50 |
|
51 |
from huggingface_hub import login
|