thenewfolder commited on
Commit
8cd8460
·
verified ·
1 Parent(s): 41442b9

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -25,7 +25,7 @@ import pandas as pd # noqa: E402
25
  import plotly.graph_objects as go # noqa: E402
26
  import torch # noqa: E402
27
  from huggingface_hub import snapshot_download # noqa: E402
28
- from lerobot.configs.types import FeatureType, PolicyFeature # noqa: E402
29
  from PIL import Image # noqa: E402
30
 
31
  from policies.dynamicvla.configuration_dynamicvla import DynamicVLAConfig # noqa: E402
@@ -86,6 +86,11 @@ def _build_config(ckpt_dir: str) -> DynamicVLAConfig:
86
  attr = key.lower()
87
  if attr in skip or value is None or not hasattr(cfg, attr):
88
  continue
 
 
 
 
 
89
  setattr(cfg, attr, value)
90
  cfg.enable_streaming = False
91
  return cfg
 
25
  import plotly.graph_objects as go # noqa: E402
26
  import torch # noqa: E402
27
  from huggingface_hub import snapshot_download # noqa: E402
28
+ from lerobot.configs.types import FeatureType, NormalizationMode, PolicyFeature # noqa: E402
29
  from PIL import Image # noqa: E402
30
 
31
  from policies.dynamicvla.configuration_dynamicvla import DynamicVLAConfig # noqa: E402
 
86
  attr = key.lower()
87
  if attr in skip or value is None or not hasattr(cfg, attr):
88
  continue
89
+ if attr == "normalization_mapping" and isinstance(value, dict):
90
+ value = {
91
+ k: (NormalizationMode[v] if isinstance(v, str) else v)
92
+ for k, v in value.items()
93
+ }
94
  setattr(cfg, attr, value)
95
  cfg.enable_streaming = False
96
  return cfg