Hi, I need to show some text and variable in the for loop. I would like to add just text to a sentence. But everytime I use any st component (st.write, st.markdown…) it is adding divs and pushing the text into the next row.
Any idea how to fix this? Thanks!
Hi, maybe you can update a variable in the for loop
for i in range(10):
sebastiandres Hi! Thanks for the response I tried to do it but it didn’t work.
What I am trying to do is to loop throw the list and assign the answer and to calculate certain score based on the response in the list. So the end result would be: sentence - small circle with tooltip - sentence - small circle with tooltip…and so on. But If I use any of the st components, as you know it creates div containers and dividing the sentences. Maybe it is easier to understand from the screenshot attached. Any idea how to resolve this?
Then maybe in the loop update a string variable, like all_my_divs where you append the divs with the score, and then later, out of the for-loop, display it?
something in the line of
for item in sentence_similarity:
score = ...
all_my_divs += """ ... all the html text """