WilliamGazeley commited on
Commit
77428fd
·
1 Parent(s): 5005937

remove extra spinner

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -42,7 +42,7 @@ def generate_irai_response(input_text):
42
  return result.split("<|assistant|>")[1].strip()
43
 
44
 
45
- @st.cache_data
46
  def generate_response(input_text):
47
  try:
48
  future_base = executor.submit(generate_base_response, input_text)
@@ -60,14 +60,13 @@ user_input = st.text_area("Enter a financial question:", "")
60
 
61
  if st.button("Generate"):
62
  if user_input:
63
- with st.spinner("Generating text..."):
64
- base_response, irai_response = generate_response(user_input)
65
- col1, col2 = st.columns(2)
66
- with col1:
67
- st.header("Base Model")
68
- st.text_area(label="", value=base_response, height=300)
69
- with col2:
70
- st.header("LLM-ADE Enhanced")
71
- st.text_area(label="", value=irai_response, height=300)
72
  else:
73
  st.warning("Please enter some text to generate a response.")
 
42
  return result.split("<|assistant|>")[1].strip()
43
 
44
 
45
+ @st.cache_data(show_spinner"Generating responses...")
46
  def generate_response(input_text):
47
  try:
48
  future_base = executor.submit(generate_base_response, input_text)
 
60
 
61
  if st.button("Generate"):
62
  if user_input:
63
+ base_response, irai_response = generate_response(user_input)
64
+ col1, col2 = st.columns(2)
65
+ with col1:
66
+ st.header("Base Model")
67
+ st.text_area(label="", value=base_response, height=300)
68
+ with col2:
69
+ st.header("LLM-ADE Enhanced")
70
+ st.text_area(label="", value=irai_response, height=300)
 
71
  else:
72
  st.warning("Please enter some text to generate a response.")