Ali2206 commited on
Commit
fb8c74f
·
verified ·
1 Parent(s): 2d902f2

Update backend/agent_instance.py

Browse files
Files changed (1) hide show
  1. backend/agent_instance.py +8 -2
backend/agent_instance.py CHANGED
@@ -1,6 +1,12 @@
1
- # backend/agent_instance.py
 
 
2
  import os
3
- from txagent.txagent import TxAgent
 
 
 
 
4
 
5
  def init_agent():
6
  model_cache_dir = os.path.expanduser("~/.cache/txagent_models")
 
1
+
2
+
3
+ import sys
4
  import os
5
+
6
+ # ✅ Add src to Python path
7
+ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "src")))
8
+
9
+ from txagent.txagent import TxAgent # ✅ Now this will work
10
 
11
  def init_agent():
12
  model_cache_dir = os.path.expanduser("~/.cache/txagent_models")