emexlabs / WearableIntelligenceSystem

Wearable computing software framework for intelligence augmentation research and applications. Easily build smart glasses apps, relying on built in voice command, speech recognition, computer vision, UI, sensors, smart phone connection, NLP, facial recognition, database, cloud connection, and more. This repo is in beta.
MIT License
110 stars 23 forks source link

KeyError: 'summary', calling the web service #22

Closed simonevetere closed 1 year ago

simonevetere commented 1 year ago

Calling the web service it responds with an error: KeyError: 'summary' step to play: 1 - after downloading the DEV branch, raise the [main_webserver.py] service 2 - call with a client (e.g. postman) http://127.0.0.1:5000/semantic_web_speech 3 - pass the {"text": "Giovanni Capuozzo"} into the request body

proposta fix: main_tools.py line "68-76"


        #limit summary
        for entity in entity_list:
            try:    
                 " ".join(entity["summary"].split(" ")[:self.summary_limit]) + "..."
            except KeyError:
                entity["summary"] = ""
                # entity["summary"] = "summary not aviable"
            pass