1TSnakers commited on
Commit
fd513e7
·
verified ·
1 Parent(s): f6fa325

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -4,6 +4,7 @@ import requests
4
  import os
5
  import time
6
  from datetime import datetime
 
7
 
8
  st.header("List Ollama model downloads")
9
 
@@ -40,8 +41,11 @@ if st.button("Make list"):
40
 
41
  total_time = time.time() - start_time
42
  total_time = round(total_time, 3)
 
 
43
 
44
  st.write(f"{len(models)} models counted in {total_time} seconds")
 
45
 
46
  df = pd.DataFrame({
47
  "model": models,
 
4
  import os
5
  import time
6
  from datetime import datetime
7
+ import humanize
8
 
9
  st.header("List Ollama model downloads")
10
 
 
41
 
42
  total_time = time.time() - start_time
43
  total_time = round(total_time, 3)
44
+ cache_time = datetime.fromisoformat(r.json()["cached_at"]) - time.time()
45
+
46
 
47
  st.write(f"{len(models)} models counted in {total_time} seconds")
48
+ st.write(f"Cache expires in {humanize.naturaltime(cache_time)}")
49
 
50
  df = pd.DataFrame({
51
  "model": models,