Spaces:
Running
Running
Create test_env.py
Browse files- test_env.py +19 -0
test_env.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import importlib
|
| 2 |
+
import huggingface_hub
|
| 3 |
+
|
| 4 |
+
print("β
Test environment started.")
|
| 5 |
+
print(f"β
huggingface-hub version: {huggingface_hub.__version__}")
|
| 6 |
+
|
| 7 |
+
try:
|
| 8 |
+
transformers = importlib.import_module("transformers")
|
| 9 |
+
print(f"β
transformers version: {transformers.__version__}")
|
| 10 |
+
except Exception as e:
|
| 11 |
+
print("β transformers not loaded:", e)
|
| 12 |
+
|
| 13 |
+
try:
|
| 14 |
+
import torch
|
| 15 |
+
print(f"β
torch version: {torch.__version__}")
|
| 16 |
+
except Exception as e:
|
| 17 |
+
print("β torch not loaded:", e)
|
| 18 |
+
|
| 19 |
+
print("β
All environment checks passed successfully!")
|