It's hard to characterize an entity like "the US public," both in the past and even today, especially given that there wasn't nearly as much polling (and with nearly as good methodology) as we have today. To my knowledge we don't have polls with fine-enough detail to distinguish between the dropping of the bomb (August 6) and the announcement of surrender (August 10 or 14 depending on whether you want to count the condition or unconditional offers).
In general, I think we can say the following. Americans greeted the atomic bomb with awe and ambivalence. When it was first used, there were letters to the editors, editorials, etc., that expressed some dismay: yet another weapon for mass slaughter. There were those who hoped and even believed that it must shorten the war. There were those who marveled in relief that the US had the bomb and nobody else (especially since the narrative of the bomb was sold as a "race for the bomb" against Germany, which was only partially true). And there were those who immediately wondered: what comes next?
It should be noted that part of your question is wrong — the idea of atomic bombs had been heard of prior to Hiroshima. It was a staple of science fiction and science journalism, even before the discovery of nuclear fission in 1939 (the term "atomic bomb" was coined by H.G. Wells in 1914). So there was "priming" in a cultural sense; even though its actual development was shocking (even the scientists were surprised it was developed as fast as it was), it didn't come out of nowhere, and so there was already a rich imagery to fall back upon. Much of that imagery involved questions about what the next war would look like, when more nations had many nuclear weapons, and whether humanity had finally created the conditions for its own suicide.
When Japan did surrender and the bomb was (rightly or wrongly) given credit for it, it did cement one idea of the bomb (a revolutionary force that could end nations and maybe war itself) at the expense of another ("just another" military innovation). Again, that could create multiple, somewhat opposing reactions: happiness that the US had such a wonderful, powerful thing, or fear as to what the "atomic age" was likely to bring.
A poll of Americans from the September 1945 show that 66% of Americans thought there was a risk of an atomic bomb being used against the USA in the next 25 years, and 83% thought that in the event of another world war, there was "real danger" of all city-dwellers being killed by nuclear weapons.
A poll from late August 1945 asked Americans whether they thought it was a good thing or a bad thing that it was developed. 69% thought it was favorable, 17% opposed (14% had no opinion). Interestingly, the same question was asked again in 1947, and the numbers had slipped to 55% in favor, 38% opposed, 7% no opinion. By early 1949 (which is to say, before the Soviet bomb had been tested) it was 59% in favor, 29% against.
Such numbers can obscure complex opinions — but it has always been a mixture (not always in equal measure) of pleasure and dread. The positive views also came from notions that "peaceful" atomic energy would also come with these developments: around 50% of Americans thought that electrical energy from nuclear power would be around in the next 10 years (not entirely wrong, though it would be more like 20 until it would be commonplace).
Anyway. It's a mixture. The bomb was certainly, in American media and culture, imbued with a positive spin after the surrender. But the long-term potential for bad was also apparent and emphasized. "The bomb was a good thing, because it ended the war," a lot of people seem to have thought, "but then again, we're all likely to die in a fiery nuclear holocaust in the next few decades."
Useful reading on this: Spencer Weart, Nuclear Fear: A History of Images; Paul Boyer, By the Bomb's Early Light: American Thought and Culture at the Dawn of the Atomic Age; Robert J. Lifton and Greg Mitchell, Hiroshima in America: A Half-Century of Denial. For the poll numbers, see Hazel Gaudet Erskine, "The Polls: Atomic Weapons and Nuclear Energy," Public Opinion Quarterly 27, no. 2 (Summer 1963), 155-190.