Skip to content

Commit

Permalink
add spinner instead of a text
Browse files Browse the repository at this point in the history
  • Loading branch information
CuriousDima committed Jun 11, 2024
1 parent be1e8cf commit 2296911
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ def print_nerdy_details(num_tokens: int):
st.error("Please wait 5 seconds before rewriting another text.")
st.stop()
else:
st.write("<i>Rewriting...</i>", unsafe_allow_html=True)
rewritten_text, total_tokens_used = llm_client.rewrite(input_text)
st.markdown("---")
st.markdown(f"{rewritten_text}")
st.session_state["time"] = time.time()
st.markdown("---")
print_nerdy_details(total_tokens_used)
with st.spinner("Rewriting..."):
rewritten_text, total_tokens_used = llm_client.rewrite(input_text)
st.markdown("---")
st.markdown(f"{rewritten_text}")
st.session_state["time"] = time.time()
st.markdown("---")
print_nerdy_details(total_tokens_used)

0 comments on commit 2296911

Please sign in to comment.