Spaces:
Runtime error
Runtime error
fix round 1
Browse files- inference.py +6 -3
inference.py
CHANGED
|
@@ -80,9 +80,12 @@ def run_task(task_name):
|
|
| 80 |
pass
|
| 81 |
|
| 82 |
# Model chooses action
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
|
|
|
|
|
|
|
|
|
| 86 |
if action not in env.action_space():
|
| 87 |
action = "detect_attack"
|
| 88 |
|
|
|
|
| 80 |
pass
|
| 81 |
|
| 82 |
# Model chooses action
|
| 83 |
+
|
| 84 |
+
action = choose_action(client, state)
|
| 85 |
+
if random.random() < 0.2:
|
| 86 |
+
action = random.choice(env.action_space())
|
| 87 |
+
|
| 88 |
+
# fallback
|
| 89 |
if action not in env.action_space():
|
| 90 |
action = "detect_attack"
|
| 91 |
|