Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,13 +25,16 @@ def install_browsergym():
|
|
25 |
|
26 |
# Verify BrowserGym is importable
|
27 |
try:
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
35 |
print("BrowserGym successfully imported")
|
36 |
except ImportError as e:
|
37 |
print(f"BrowserGym import verification failed: {e}")
|
|
|
25 |
|
26 |
# Verify BrowserGym is importable
|
27 |
try:
|
28 |
+
import importlib.util
|
29 |
+
|
30 |
+
# Try to import HighLevelActionSet
|
31 |
+
spec = importlib.util.find_spec("browsergym.core.action.highlevel")
|
32 |
+
if spec is None:
|
33 |
+
print("Module browsergym.core.action.highlevel not found")
|
34 |
+
else:
|
35 |
+
module = importlib.util.module_from_spec(spec)
|
36 |
+
spec.loader.exec_module(module)
|
37 |
+
HighLevelActionSet = getattr(module, "HighLevelActionSet")
|
38 |
print("BrowserGym successfully imported")
|
39 |
except ImportError as e:
|
40 |
print(f"BrowserGym import verification failed: {e}")
|