Genuine humility will admit both, but its greatest desire is for God to receive the credit he deserves. Instead, he truthfully acknowledges the fact that what he did came from God, and that it was possible only because of what God did in his heart. He does not want to steal the praise for himself, but to direct it toward the one who deserves it. Nor does he fail to give God the credit, by passively withholding deserved praise from God - by remaining silent. He knows that without God working in and through him, nothing good would have ever existed - and the humble person knows it, and is willing to admit it.
Many people have a false impression of the purpose of humility.
We can't even begin to have genuine humility until our relationship with God has been restored - until we have been made alive in Christ. The humility that comes from God is the result of what God has done in our heart, and as a result, it is pleasing to God. Genuine humility is not a mere option among many. Though we will not reach the fullest attainment of humility in this present life, we can attain it at least in part, as we submit to the Word of God. It is an acknowledgment of our position before God, the Creator of all things.