chore: Update import statement for CustomComponent in validate.py
This commit is contained in:
parent
4e104b7c12
commit
c4cdb186b8
1 changed files with 4 additions and 1 deletions
|
|
@ -159,7 +159,10 @@ def create_class(code, class_name):
|
|||
|
||||
# Replace from langflow import CustomComponent with from langflow.custom import CustomComponent
|
||||
code = code.replace("from langflow import CustomComponent", "from langflow.custom import CustomComponent")
|
||||
|
||||
code = code.replace(
|
||||
"from langflow.interface.custom.custom_component import CustomComponent",
|
||||
"from langflow.custom import CustomComponent",
|
||||
)
|
||||
module = ast.parse(code)
|
||||
exec_globals = prepare_global_scope(code, module)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue