Yellen warns of risks to US economy, sees hope to avoid recession