Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,7 +43,7 @@ def run_pencilclaw_command(command: str):
|
|
| 43 |
[str(PENCILCLAW_PATH), command],
|
| 44 |
capture_output=True,
|
| 45 |
text=True,
|
| 46 |
-
timeout=
|
| 47 |
)
|
| 48 |
return result.stdout.strip() if result.stdout else result.stderr.strip()
|
| 49 |
except subprocess.TimeoutExpired:
|
|
@@ -58,7 +58,7 @@ def run_ollama_cli(prompt: str, model: str = OLLAMA_MODEL):
|
|
| 58 |
["ollama", "run", model, prompt],
|
| 59 |
capture_output=True,
|
| 60 |
text=True,
|
| 61 |
-
timeout=
|
| 62 |
)
|
| 63 |
return result.stdout.strip() if result.stdout else result.stderr.strip()
|
| 64 |
except subprocess.TimeoutExpired:
|
|
@@ -101,7 +101,7 @@ def execute_code(code_text: str):
|
|
| 101 |
["python3", str(tmp_file)],
|
| 102 |
capture_output=True,
|
| 103 |
text=True,
|
| 104 |
-
timeout=
|
| 105 |
)
|
| 106 |
return result.stdout + result.stderr
|
| 107 |
except Exception as e:
|
|
@@ -174,7 +174,7 @@ def process_command(cmd: str, model: str = OLLAMA_MODEL):
|
|
| 174 |
["python3", str(tmp_file)],
|
| 175 |
capture_output=True,
|
| 176 |
text=True,
|
| 177 |
-
timeout=
|
| 178 |
)
|
| 179 |
output = result.stdout + result.stderr
|
| 180 |
except Exception as e:
|
|
|
|
| 43 |
[str(PENCILCLAW_PATH), command],
|
| 44 |
capture_output=True,
|
| 45 |
text=True,
|
| 46 |
+
timeout=600
|
| 47 |
)
|
| 48 |
return result.stdout.strip() if result.stdout else result.stderr.strip()
|
| 49 |
except subprocess.TimeoutExpired:
|
|
|
|
| 58 |
["ollama", "run", model, prompt],
|
| 59 |
capture_output=True,
|
| 60 |
text=True,
|
| 61 |
+
timeout=600
|
| 62 |
)
|
| 63 |
return result.stdout.strip() if result.stdout else result.stderr.strip()
|
| 64 |
except subprocess.TimeoutExpired:
|
|
|
|
| 101 |
["python3", str(tmp_file)],
|
| 102 |
capture_output=True,
|
| 103 |
text=True,
|
| 104 |
+
timeout=600
|
| 105 |
)
|
| 106 |
return result.stdout + result.stderr
|
| 107 |
except Exception as e:
|
|
|
|
| 174 |
["python3", str(tmp_file)],
|
| 175 |
capture_output=True,
|
| 176 |
text=True,
|
| 177 |
+
timeout=600
|
| 178 |
)
|
| 179 |
output = result.stdout + result.stderr
|
| 180 |
except Exception as e:
|