Aksel Joonas Reedi commited on
Commit
ed56d3d
·
2 Parent(s): 6ac731b574496f

Merge pull request #29 from huggingface/space-merge

Browse files
agent/tools/sandbox_client.py CHANGED
@@ -86,7 +86,6 @@ ENV HOME=/home/user \\
86
  PIP_USER=1 \\
87
  HF_HUB_DISABLE_PROGRESS_BARS=1 \\
88
  TQDM_DISABLE=1 \\
89
- TRANSFORMERS_VERBOSITY=warning \\
90
  HF_HUB_ENABLE_HF_TRANSFER=1
91
 
92
  WORKDIR /app
 
86
  PIP_USER=1 \\
87
  HF_HUB_DISABLE_PROGRESS_BARS=1 \\
88
  TQDM_DISABLE=1 \\
 
89
  HF_HUB_ENABLE_HF_TRANSFER=1
90
 
91
  WORKDIR /app
agent/tools/sandbox_tool.py CHANGED
@@ -66,6 +66,9 @@ async def _ensure_sandbox(
66
  sb = await asyncio.to_thread(Sandbox.create, **kwargs)
67
  session.sandbox = sb
68
 
 
 
 
69
  await session.send_event(
70
  Event(
71
  event_type="tool_log",
 
66
  sb = await asyncio.to_thread(Sandbox.create, **kwargs)
67
  session.sandbox = sb
68
 
69
+ # Inject the OAuth token into the sandbox so Hub operations work inside it
70
+ await asyncio.to_thread(api.add_space_secret, sb.space_id, "HF_TOKEN", token)
71
+
72
  await session.send_event(
73
  Event(
74
  event_type="tool_log",
frontend/src/components/Chat/ToolCallGroup.tsx CHANGED
@@ -111,8 +111,8 @@ function InlineApproval({
111
  <Box component="span" sx={{ fontWeight: 500, color: 'var(--text)' }}>
112
  {String(args.hardware || 'cpu-basic')}
113
  </Box>
114
- {args.private && (
115
- <Box component="span" sx={{ color: 'var(--muted-text)' }}> (private)</Box>
116
  )}
117
  </Typography>
118
  </Box>
 
111
  <Box component="span" sx={{ fontWeight: 500, color: 'var(--text)' }}>
112
  {String(args.hardware || 'cpu-basic')}
113
  </Box>
114
+ {!!args.private && (
115
+ <Box component="span" sx={{ color: 'var(--muted-text)' }}>{' (private)'}</Box>
116
  )}
117
  </Typography>
118
  </Box>