jmercat commited on
Commit
349aedb
β€’
1 Parent(s): 5769ee4

try to get access with secret

Browse files
README.md CHANGED
@@ -2,9 +2,8 @@
2
  title: "RAP: Risk-Aware Prediction"
3
  emoji: πŸš™
4
  colorFrom: red
5
- colorTo: grey
6
  sdk: gradio
7
- sdk_version: 3.7
8
  app_file: app.py
9
  pinned: false
10
  language:
 
2
  title: "RAP: Risk-Aware Prediction"
3
  emoji: πŸš™
4
  colorFrom: red
5
+ colorTo: gray
6
  sdk: gradio
 
7
  app_file: app.py
8
  pinned: false
9
  language:
scripts/scripts_utils/plotly_interface.py CHANGED
@@ -348,17 +348,17 @@ def main(load_from=None, cfg_path=None):
348
  # Define the device to use
349
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
350
 
351
- predictor, dataset = load_from_huggingface(device=device)
352
- if load_from is not None:
353
- cfg = Config.fromfile(cfg_path)
354
- predictor = get_predictor(cfg, WaymoDataloaders.unnormalize_trajectory)
355
- predictor = load_weights(predictor, torch.load(load_from, map_location="cpu"))
356
-
357
- ui_update_fn = partial(update_figure, predictor, dataset)
358
-
359
  # Do the same thing as above but using the gradio blocks API
360
  with gr.Blocks() as interface:
 
 
 
 
 
 
 
361
 
 
362
  gr.Markdown(
363
  """
364
  # Risk-Aware Prediction
 
348
  # Define the device to use
349
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
350
 
 
 
 
 
 
 
 
 
351
  # Do the same thing as above but using the gradio blocks API
352
  with gr.Blocks() as interface:
353
+
354
+ predictor, dataset = load_from_huggingface(device=device)
355
+
356
+ if load_from is not None:
357
+ cfg = Config.fromfile(cfg_path)
358
+ predictor = get_predictor(cfg, WaymoDataloaders.unnormalize_trajectory)
359
+ predictor = load_weights(predictor, torch.load(load_from, map_location="cpu"))
360
 
361
+ ui_update_fn = partial(update_figure, predictor, dataset)
362
  gr.Markdown(
363
  """
364
  # Risk-Aware Prediction