jetpackjules commited on
Commit
4ddaaf1
·
verified ·
1 Parent(s): 84967bd

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. vm_data_server.py +6 -1
vm_data_server.py CHANGED
@@ -280,13 +280,18 @@ def execute_command():
280
 
281
  # Execute command with timeout
282
  import subprocess
 
 
 
 
 
283
  result = subprocess.run(
284
  command,
285
  shell=True,
286
  capture_output=True,
287
  text=True,
288
  timeout=30, # 30 second timeout
289
- cwd='/home/jetpackjules/Stock-Trader' # Run in trading directory
290
  )
291
 
292
  return jsonify({
 
280
 
281
  # Execute command with timeout
282
  import subprocess
283
+ import os
284
+
285
+ # Use current working directory (where the server was started)
286
+ cwd = os.getcwd()
287
+
288
  result = subprocess.run(
289
  command,
290
  shell=True,
291
  capture_output=True,
292
  text=True,
293
  timeout=30, # 30 second timeout
294
+ cwd=cwd # Run in current directory
295
  )
296
 
297
  return jsonify({