Spaces:
Build error
Build error
Update app.py
Browse files5 unmodified lines678910114 unmodified lines161718195 unmodified linesmessages = [{"role": "system", "content": "You are a financial experts that specializes in real estate investment and negotiation"}]def CustomChatGPT(user_input):messages.append({"role": "user", "content": user_input})response = openai.ChatCompletion.create(model = "gpt-3.5-turbo",4 unmodified linesreturn ChatGPT_replyiface = gr.Interface(fn=CustomChatGPT, inputs="text", outputs="text", title = "ChatBot")iface.launch(debug = True)5 unmodified lines6789101112134 unmodified lines181920215 unmodified linesmessages = [{"role": "system", "content": "You are a financial experts that specializes in real estate investment and negotiation"}]def CustomChatGPT(user_input):if len(messages) > 10:messages.pop(0)messages.append({"role": "user", "content": user_input})response = openai.ChatCompletion.create(model = "gpt-3.5-turbo",4 unmodified linesreturn ChatGPT_replyiface = gr.Interface(fn=CustomChatGPT, inputs="text", outputs="text", title = "ChatBot")iface.launch(debug = True)
app.py+3-1