How is a public/private key pair generated from a Diffe-Hellman key exchange? I very well understand the DH key exchange. But what is the public key and private key at the end of the exchange.

For example:
Alice and Bob agree to use a modulus $p = 23$ and base $g = 5$ (which is a primitive root modulo $23$).

Alice chooses a secret integer $a = 6$, then sends Bob $A = g^a \bmod p
= 5^6 \bmod 23 = 8$

Bob chooses a secret integer $b = 15$, then sends Alice $B = g^b \bmod p
= 5^{15} \bmod 23 = 19$

Alice computes $s = B^a \bmod p
= 19^6 \bmod 23 = 2$

Bob computes $s = A^b \bmod p
= 8^{15} \bmod 23 = 2$

Alice and Bob now share a secret (the number $2$).



So is $2$ the private key here ? If it's a private key then both Alice and Bob know it even though the eavesdroppers don't know. Please explain how public key/private key pair is generated from this shared secret $2$.
So is 2 the private key here ?


No, it's referred to as a "shared secret" (because it is shared between Alice and Bob, and is secret to everyone else).

If there were 'private' and 'public' keys (which is not the standard terminology with DH), then Alice's private key would be $a=6$, and the public key would be $g^a = 8$.  In this case, the 'private key' is private, in the sense that it allows her to perform the operation of deriving the shared secret; something that we hope is difficult if someone has only the public keys.