how to print the value on top of barchart in plotly

i know about the text and textposition method in plotly but it is working for value AUTO which prints the value inside of that bar not on top of that and ios there any method to get it done for horizontal and stack barchart to show numbers the best way possible as it's definitely not gonna work for those cases(stack and horizontal), any suggestion would be great and helpful