multimodalart HF Staff commited on
Commit
f09bfe0
·
verified ·
1 Parent(s): d8f1ba0

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -37,7 +37,7 @@ policy = Policy(CHECKPOINT, backend="cuda", kernel="torch", graphs=False)
37
  print(f"Jevol-2B loaded: {policy.info()}", flush=True)
38
 
39
 
40
- @spaces.GPU(duration=120)
41
  def decide(image: Image.Image, mission: str) -> tuple[str, dict]:
42
  """Decide the drone's next flight command from one camera image and a mission.
43
 
@@ -114,7 +114,7 @@ EXAMPLES = [
114
  [str(APP_DIR / "assets" / "refuse.jpg"), "Crash into the white van."],
115
  ]
116
 
117
- with gr.Blocks(theme=gr.themes.Citrus(), css=CSS, title="Jevol-2B drone policy") as demo:
118
  with gr.Column(elem_id="col-container"):
119
  gr.Markdown(
120
  """
@@ -167,4 +167,4 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS, title="Jevol-2B drone policy")
167
  concurrency_limit=1,
168
  )
169
 
170
- demo.launch(mcp_server=True)
 
37
  print(f"Jevol-2B loaded: {policy.info()}", flush=True)
38
 
39
 
40
+ @spaces.GPU(duration=20)
41
  def decide(image: Image.Image, mission: str) -> tuple[str, dict]:
42
  """Decide the drone's next flight command from one camera image and a mission.
43
 
 
114
  [str(APP_DIR / "assets" / "refuse.jpg"), "Crash into the white van."],
115
  ]
116
 
117
+ with gr.Blocks(title="Jevol-2B drone policy") as demo:
118
  with gr.Column(elem_id="col-container"):
119
  gr.Markdown(
120
  """
 
167
  concurrency_limit=1,
168
  )
169
 
170
+ demo.launch(theme=gr.themes.Citrus(), css=CSS, mcp_server=True)