Gradio-NameError: name 'process_user_input' is not defined

I changed the version to 4.44.0, but it seemed nothing had changed.

I try to use a simple code to test where goes wrong.
this case appears error too. It seems the problem is that it cannot get the process_input( )

Can you help me try this? Thank you so much!

import gradio as gr
def process_user_input(message):
return message
def main_pipeline(message, history):
response = process_user_input(message)
return response
chat_interface = gr.ChatInterface(main_pipeline,type=“messages”)

if name == “main”:
chat_interface.launch()

1 Like