Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 11:36 PM
Thank you @Retired_mod, its really helpful and did worked. Another quick question, I have to pass 2 parameters as input to myfunc. Please help how to pass multiple parameters.
def myfunc(input_text, param2):
# Assuming mlflowmodel is defined elsewhere
result = mlflowmodel.predict(input_text, param2)
return result
# Create a Pandas UDF
@pandas_udf(StringType())
def myfunc_udf(input_text_series: pd.Series, param2_series: pd.Series) -> pd.Series:
return input_text_series.apply(myfunc) ??