I have an ML model in python that takes string input from the users. How do I execute this (user input into python script node)? Adding the section of the code that takes user input -
df = pd.read_excel(“Samplefile.xls”)
val = input("Enter Value: ")
if val == ‘All’:
revenue = df
revenue = df.loc[df[‘Section’] == val]
Any help would be appreciated.
The correct way, I think, is for you to use a String Configuration or Single Selection Configuration node, connect that to the Python Snippet and use the flow variable there. You can wrap both into a component to have it as one configurable node.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.