I’m building a basic chat app. When deployed locally, it’s working perfectly, as seen here:
But when I deploy it on a server, the text keeps flashing repeatedly.
I’ve made sure that the code is exactly thee same in both locations. Here’s the code for printing the generated text.
if genresponse != None:
start= time.time()
for chunk in genresponse['results'][0]['generated_text']:
if chunk == "User:" or chunk == "Stu:" or chunk == "User: " or chunk == "Stu: " :
messagefull += " \n"
time.sleep(0.05)
placehold.markdown(messagefull+"|")
else:
messagefull += chunk
time.sleep(0.05)
placehold.markdown(messagefull+"|")
end = time.time()
placehold.markdown(messagefull)
I’m not sure why this is happening, and would appreciate any help, since I’m very new to using Streamlit.