AItool commited on
Commit
c81b713
·
verified ·
1 Parent(s): d9851a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -16,6 +16,10 @@ client = InferenceClient(api_key=api_key)
16
  # Streamlit app title
17
  st.title("Text-generation model using Streamlit from Inference API (serverless) feature.")
18
 
 
 
 
 
19
  # Ensure the full_text key is initialized in session state
20
  if "full_text" not in st.session_state:
21
  st.session_state["full_text"] = ""
 
16
  # Streamlit app title
17
  st.title("Text-generation model using Streamlit from Inference API (serverless) feature.")
18
 
19
+ # Ensure the timing variables are initialized in session state
20
+ if "elapsed_time" not in st.session_state:
21
+ st.session_state["elapsed_time"] = 0.0
22
+
23
  # Ensure the full_text key is initialized in session state
24
  if "full_text" not in st.session_state:
25
  st.session_state["full_text"] = ""