The rate of inflation picked up slightly during the month of June, but the worst ravages of both inflation and recession may be almost over, the chairman of the president's Council of Economic Advisers said yesterday.

The Labor Department reported yesterday that the consumer price index rose a seasonally adjusted rate of 1 percent in June, or a 12.4 percent compounded annual rate, following two months of slower-paced increases of 0.9 percent.

Mortgages arranged at high interest rates of a few months before but reflected in the June statistics acounted for much of the change, Chairman Charles L. Schultze said yesterday.

"The worst of the inflation is behind us," said Schultze. He also said that "evidence is beginning to pile up that the rate of recession has begun to moderate."

"The upturn is not immediately around the corner, but it is in sight," he told the congressional Joint Economic Committee.

At the same time national figures were being released, the Labor Department also reported soaring price increases for food in the Washington metropolitan area. Food prices that had been rising at a rate of 1.9 percent a month for five months shot up at the rate of 3.1 percent in June, according to the Labor Department.

Steep increases in the prices of fresh fruits and vegetables apparently accounted for most of that increase. Nationally, food prices rose only 0.5 percent, but the national figure was seasonally adjusted, while the local index figure was not.

Housing prices, including mortgage interest rates, accounted for more than 80 percent of the June increase in the national CPI, the Department of Labor said.

The CPI rose before seasonal adjustment to 247.6, from a base of 100 in 1967.Schultze said he expects June would be the last month to reflect the lagged effects of earlier increases in mortgage interest rates. "Inflation as measured by the CPI may fall significantly during the next several months," he said.

The index for food and beverages rose 0.5 percent in June, continuing a pattern of moderate increases in that sector.

"We've gone through a period now for a year where food prices have gone up but at an extremely low rate," said Howard Hjort, the Agriculture Department's chief economist. "That's not because the cost of marketing food has been anything but out of sight but because farm prices have continued to decline sharply," he said.

Hjort also said that it appears now that the drought and extreme heat experienced in much of the country will not increase overall food prices significantly. Prices for sugar and sweets rose in June reflecting earlier world sugar market price increases.

Transportation costs as part of the CPI declined 0.2 percent in June, following increases in April and May. Most of the decrease came from a decline in gasoline prices.

Schultze pointed out the obvious -- that the slowing down of inflation has been accompanied by a fairly steep recession. But the shape of the recession has begun to change, he said.

Steep declines in the automobile industry and in housing appear to have bottomed out, he said. He also noted a decline in initial claims for unemployment insurance in the first two weeks of July.

While the signs are tentative, "Evidence has begun to accumulate that the rate of decline, the rate of recession, is moderating," he said. "The trough of the recession may be reached before the end of this year," followed by a slow recovery in 1981, he added.

Two major questions are whether consumers will return to normal buying habits or "run for the storm cellar as they see their neighbors laid off" and how sharply business officials will cut back investment plans during recession, according to Schultze.

Contending that "this has been the most widely advertised recession in history," he said that business plans appear to have been drawn up with recession in mind and may not be sharply altered.

Schultze called the economic forecast -- "an end to the recession before the end of 1980 followed by a slow recovery" -- unsatisfactory to the administration because it means continued high rates of unemployment and an inflation rate higher than desired.

He said the administration will work with Congress to develop a plan for a noninflationary and sustained recovery. The major challenge is "to attack fundamental structural problems and not merely inject a traditional antirecession stimulus into the economy," he said.

Among the structural problems Schutlze mentioned were a need to increase capital formation, particularly to meet the needs for investment in alternative energy sources, and to replace facilities made obsolete by higher energy prices.

Schultze also attacked those who promote supply-side economics as a panacea."We cannot use supply-side tax cuts to escape the need for long-term demand restraint and for careful attention to the long-term budgetary consequences of tax reductions," he said.

But he added that the administration believes a tax cut may be appropriate and desirable in 1981.