From museum exhibits to booming AI hubs, San Francisco navigates optimism and anxiety amid the rapid growth of artificial intelligence.