In an interview with CNBC, Treasury Secretary Janet Yellen predicted that the United States would have to "put up with inflation for a while longer."