def update_state(self, dacts):
        """
        Updates the current dialogue state given the input dialogue acts. This
        function will process the input, query the ludwig model, and retrieve
        the updated dialogue state.

        :param dacts: the input dialogue acts (usually nlu output)
        :return: the current dialogue state
        """

        self.DState.user_acts = deepcopy(dacts)

        dst_in = dict()

        dst_in['dst_prev_area'] = 'none'
        if self.DState.slots_filled['area']:
            dst_in['dst_prev_area'] = self.DState.slots_filled['area']

        dst_in['dst_prev_food'] = 'none'
        if self.DState.slots_filled['food']:
            dst_in['dst_prev_food'] = self.DState.slots_filled['food']

        dst_in['dst_prev_pricerange'] = 'none'
        if self.DState.slots_filled['pricerange']:
            dst_in['dst_prev_pricerange'] = \
                self.DState.slots_filled['pricerange']

        dst_in['nlu_intent'] = 'none'
        dst_in['req_slot'] = 'none'
        dst_in['inf_area_value'] = 'none'
        dst_in['inf_food_value'] = 'none'
        dst_in['inf_pricerange_value'] = 'none'

        intents = set()

        for da in dacts:
            intents.add(da.intent)

            for p in da.params:
                if da.intent == 'inform':
                    if p.slot == 'area':
                        dst_in['inf_area_value'] = p.value

                    elif p.slot == 'food':
                        dst_in['inf_food_value'] = p.value

                    elif p.slot == 'pricerange':
                        dst_in['inf_pricerange_value'] = p.value

                elif da.intent == 'request':
                    dst_in['req_slot'] = p.slot

        dst_in['nlu_intent'] = ' '.join(intents)

        input_data = [dst_in]

        # Warning: Make sure the same tokenizer that was used to train
        # the model is used during prediction
        result = self.model.predict(pd.DataFrame(data=input_data))

        area_prediction = result['dst_area_predictions'][0]
        if area_prediction == 'none':
            area_prediction = None

        self.DState.slots_filled['area'] = area_prediction

        food_prediction = result['dst_food_predictions'][0]
        if food_prediction == 'none':
            food_prediction = None

        self.DState.slots_filled['food'] = food_prediction

        pricerange_prediction = result['dst_pricerange_predictions'][0]
        if pricerange_prediction == 'none':
            pricerange_prediction = None

        self.DState.slots_filled['pricerange'] = pricerange_prediction

        req_slot_prediction = result['dst_req_slot_predictions'][0]
        if req_slot_prediction == 'none':
            req_slot_prediction = None

        self.DState.requested_slot = req_slot_prediction
        self.DState.is_terminal_state = 'bye' in intents

        self.DState.turn += 1

        return self.DState

        Updates the current dialogue state given the input dialogue acts. This
        function will process the input, query the ludwig model, and retrieve
        the updated dialogue state.

        :param dacts: the input dialogue acts (usually nlu output)
        :return: the current dialogue state
        
applications/cambridge_restaurants/camrest_dst.py