Update app.py
Browse files
app.py
CHANGED
|
@@ -25,8 +25,14 @@ for d in [model_cache_dir, tool_cache_dir, file_cache_dir, report_dir]:
|
|
| 25 |
os.environ["HF_HOME"] = model_cache_dir
|
| 26 |
os.environ["TRANSFORMERS_CACHE"] = model_cache_dir
|
| 27 |
|
|
|
|
| 28 |
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "src"))
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
MAX_MODEL_TOKENS = 32768
|
| 32 |
MAX_CHUNK_TOKENS = 8192
|
|
|
|
| 25 |
os.environ["HF_HOME"] = model_cache_dir
|
| 26 |
os.environ["TRANSFORMERS_CACHE"] = model_cache_dir
|
| 27 |
|
| 28 |
+
# Fixed this line - added missing closing parenthesis
|
| 29 |
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "src"))
|
| 30 |
+
|
| 31 |
+
try:
|
| 32 |
+
from txagent.txagent import TxAgent
|
| 33 |
+
except ImportError as e:
|
| 34 |
+
print(f"Error importing TxAgent: {e}")
|
| 35 |
+
sys.exit(1)
|
| 36 |
|
| 37 |
MAX_MODEL_TOKENS = 32768
|
| 38 |
MAX_CHUNK_TOKENS = 8192
|