Artificial intelligence technique can detect cancerous tissue in real time