Mahdiyar
commited on
Commit
·
60e4781
1
Parent(s):
33b6737
Same Python Version between local and Remote
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import asyncio
|
|
|
|
| 2 |
from tinyagent import tool
|
| 3 |
from textwrap import dedent
|
| 4 |
from typing import Optional, List, Dict, Any,Union
|
|
@@ -68,7 +69,7 @@ def _run_python(code: str,globals_dict:Dict[str,Any]={},locals_dict:Dict[str,Any
|
|
| 68 |
|
| 69 |
class PythonCodeInterpreter:
|
| 70 |
executed_default_codes = False
|
| 71 |
-
PYTHON_VERSION = "
|
| 72 |
sandbox_name = "tinycodeagent-sandbox"
|
| 73 |
app = None
|
| 74 |
_app_run_python = None
|
|
|
|
| 1 |
import asyncio
|
| 2 |
+
import sys # Add sys import
|
| 3 |
from tinyagent import tool
|
| 4 |
from textwrap import dedent
|
| 5 |
from typing import Optional, List, Dict, Any,Union
|
|
|
|
| 69 |
|
| 70 |
class PythonCodeInterpreter:
|
| 71 |
executed_default_codes = False
|
| 72 |
+
PYTHON_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}" # Automatically detect Python version
|
| 73 |
sandbox_name = "tinycodeagent-sandbox"
|
| 74 |
app = None
|
| 75 |
_app_run_python = None
|