Real-time applications such as smart transportation systems require minimum response time to increase performance. Incorporating edge computing, processing units near end devices, achieving fast response time. The collaboration between edge servers and cloud servers is beneficial in achieving the lowest response time by using edge servers and high computational resources by using cloud servers. The workload allocation between edge–cloud servers is challenging, especially in a highly dynamic system with multiple factors varying over time. In this paper, the workload allocation decisions among the edge servers and cloud are considered for autonomous vehicle systems. The autonomous vehicle system generates multiple tasks belonging to different AI applications running on the vehicles. The proposed method considers allocating the tasks to edge or cloud servers. The cloud servers can be reached through a cellular network or a wireless network. The proposed method is based on designing a neural network model and using a high number of features that contribute to the decision-making process. A huge dataset has also been generated for the implementation. The EdgeCloudSim is used as a simulator for implementation. The competitor's methods considered for the comparison are random, simple moving average (SMA) based, multi-armed bandit (MAB) theory-based, game theory-based, and machine learning-based workload allocation methods. The result shows an improvement in the average Quality of Experience (QoE), ranging from 8.33% to 28.57%, while the average failure rate achieved enhancement up to 50%.