Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- server/app.py +13 -5
server/app.py
CHANGED
|
@@ -36,11 +36,19 @@ except Exception as e: # pragma: no cover
|
|
| 36 |
) from e
|
| 37 |
|
| 38 |
try:
|
| 39 |
-
from .
|
| 40 |
-
from .traffic_light_env_environment import TrafficLightEnvironment
|
| 41 |
-
except
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
# Create the app with web interface and README integration
|
|
|
|
| 36 |
) from e
|
| 37 |
|
| 38 |
try:
|
| 39 |
+
from traffic_light_env.models import TrafficLightAction, TrafficLightObservation
|
| 40 |
+
from traffic_light_env.server.traffic_light_env_environment import TrafficLightEnvironment
|
| 41 |
+
except ImportError:
|
| 42 |
+
try:
|
| 43 |
+
from ..models import TrafficLightAction, TrafficLightObservation
|
| 44 |
+
from .traffic_light_env_environment import TrafficLightEnvironment
|
| 45 |
+
except ImportError:
|
| 46 |
+
import sys
|
| 47 |
+
from pathlib import Path
|
| 48 |
+
|
| 49 |
+
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
| 50 |
+
from models import TrafficLightAction, TrafficLightObservation
|
| 51 |
+
from server.traffic_light_env_environment import TrafficLightEnvironment
|
| 52 |
|
| 53 |
|
| 54 |
# Create the app with web interface and README integration
|