A young woman doctor, whom the South African government banished to this remote tribal village because of her relationship with Steve Biko, the black political leader who later died in police custody, has been told that she is now free to leave.

But so involved has Mamphela Ramphele, 35, become in trying to improve the lives of the dirt-poor people among whom she was dumped, that the many community projects she started will keep her tied to the village for nearly another year.

She reckons it will take that long to make plans for others to keep the projects going.

People in business and church organizations who have helped Ramphele finance her projects, which range from a medical clinic to a public library and a community brickyard, compare her efforts to those of Albert Schweitzer, the 1952 Nobel Peace Prize winner who ran a community hospital in the jungle of Equatorial Africa.

As Ramphele described it in an interview at the Ithuseng community health clinic, which she established soon after her arrival, her six years here have been devoted to channeling a huge personal anger at what was done to Biko into constructive action.

She met Biko at medical school in Durban in the late 1960s and soon formed a close personal and political relationship with him.

Biko's involvement in black politics led to his suspension from medical school, and while Ramphele went on to become a doctor he became leader of what was known as the black consciousness movement.

The movement grew rapidly, particularly among young blacks, and in 1973 the South African government placed Biko under a banning order, restricting him to the country town of King William's Town in eastern Cape Province.

Ramphele moved there to be near him, founding the Zanempilo community clinic as a project in line with Biko's philosophy of self-help as the key to liberating black people from the psychology of oppression.

Ramphele was pregnant with Biko's child when the security police banished her from King William's Town to this tribal village 1,000 miles away in northern Transvaal Province, where she knew no one and had only a sketchy understanding of the local dialect.

That was five months before Biko was detained by the security police for interrogation and died of brain damage while in their custody. Ramphele was in a hospital with a threatened miscarriage when the news reached her. "I didn't believe it at first," she said. "Then, when I could no longer deny it, I nearly disintegrated."

Suddenly the birth of the baby became desperately important to her.

"I was frantic to keep the baby, to keep alive something of our relationship. And of course the more agitated I became the more the threat of spontaneous abortion increased."

Eventually she recovered, to be sent back to her hot and dusty Siberia where she had to spend the remaining four months of her pregnancy quietly in bed.

"I just sat there thinking about my misery, going through all kinds of destructive, nonproductive emotions," she recalled.

Then the baby arrived, a boy, "the spitting image of Steve." Ramphele named him Hlumelo, a word in Biko's Xhosa language that means "the shoot from a dead tree."

"From that moment I decided to turn my anger into action," Ramphele said.

Lenyenye township is situated in one of the small tribal "homelands" that are strung like an inland archipelago around the northern and eastern perimeter of South Africa.

The white minority government has earmarked these poorly developed areas for nominal independence for the black population, and all who are not needed as workers in what is officially regarded as "white" South Africa are being forced to go there.

Ramphele estimates that the population of Lenyenye and its immediate neighborhood has more than doubled from 20,000 to about 50,000 in the six years she has been here.

Appalled at the toll diseases caused by malnutrition are taking on this expanding and mostly illiterate community, and at the pervading apathy and defeatism, Ramphele decided to do something about it.

She started a clinic in some rooms behind a church, then raised $80,000 from big business and church organizations to build Ithuseng. It now has a staff of 12 and last year attended to 17,931 patients.

The clinic has become the nucleus of a range of other projects. It has two branches in neighboring villages; there is a twice weekly soup kitchen and milk project; five local groups have been organized to teach home economics, hygiene and health care; there is a play center for the children of the lucky few mothers who have jobs; gardening clubs teach the villagers how to grow vegetables, and an adult literacy program operates in five villages.

Local women have been organized into sewing and knitting clubs that sell their products. Ramphele has raised enough money to build and stock a public library and to start a scholarship fund to send the brightest local children to college.

The brickyard, started to cut local building costs, employs 16 people, has its own tractor and produces 20,000 bricks a month.

"Sometimes I despair," Ramphele said, looking up from examining a sick and malnourished infant who died later on the day of the interview. "What I am doing here is such a drop in the ocean. Sometimes I feel I am just wasting my time and energy.

"I wonder whether anyone realizes the magnitude of the crisis that is building up in these areas," Ramphele went on. "Pretoria has shifted the responsibilities for all these desperate people on to the tribal homeland governments, which don't begin to have the ability or the insight to cope.

"I wonder whether even our black liberation movements understand the scale of the problem. If we had liberation tomorrow I don't think they'd know how to handle it. It will take years. The psychological destruction that goes with oppression at this level is unbelievable."

Then, brightening at the sight of a large and cheerful peasant woman bustling into the office, Ramphele added: "But just when you are feeling defeated you see someone you have been able to help and it all seems worthwhile again."

Ramphele's banishment order, which also prohibited her from being in social gatherings with more than one other person or from being quoted in any South African publication, was one of more than 50 that the South African government allowed to lapse in June.

Local political and diplomatic observers have attributed this to pressure from the United States, and it is being cited as the first significant achievement of the Reagan administration's policy of "constructive engagement" with South Africa.

Ramphele plans to leave Lenyenye about April. Her son is now a robust 5-year-old who has begun attending school. She married a pharmacist, Sipho Magele, last year and she wants to join him in the eastern cape town of Uitenhage, near King William's Town.

"But I'll come back often," she promised. "It's strange. I hated it when I first came here. I didn't know a soul and I had nowhere to stay. A Catholic priest gave me accommodation with some nuns.

"Now I have become so involved with everyone around here that it has become home to me. It will be a terrible wrench to leave."