AItool commited on
Commit
dd6c6ef
·
verified ·
1 Parent(s): 4b3ea0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -15,14 +15,14 @@ client = InferenceClient(api_key=api_key)
15
 
16
  # Function to simulate some process and return the elapsed time
17
  def process_with_timing(): start_time = time.time()
18
- # Simulate a process with sleep
19
- time.sleep(2.345)
20
- # Change this value to simulate different processing times
21
- end_time = time.time()
22
- elapsed_time = end_time - start_time
23
- minutes, seconds = divmod(elapsed_time, 60)
24
- milliseconds = (seconds - int(seconds)) * 1000
25
- return minutes, int(seconds), milliseconds
26
 
27
  # Streamlit app title
28
  st.title("Text-generation model using Streamlit from Inference API (serverless) feature.")
 
15
 
16
  # Function to simulate some process and return the elapsed time
17
  def process_with_timing(): start_time = time.time()
18
+ # Simulate a process with sleep
19
+ time.sleep(2.345)
20
+ # Change this value to simulate different processing times
21
+ end_time = time.time()
22
+ elapsed_time = end_time - start_time
23
+ minutes, seconds = divmod(elapsed_time, 60)
24
+ milliseconds = (seconds - int(seconds)) * 1000
25
+ return minutes, int(seconds), milliseconds
26
 
27
  # Streamlit app title
28
  st.title("Text-generation model using Streamlit from Inference API (serverless) feature.")