pandora-s commited on
Commit
f570858
1 Parent(s): 811f211

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -42,7 +42,16 @@ def get_available_free():
42
  def update_data():
43
  data = get_available_free()
44
  df = pd.DataFrame(data)
45
- df = df.sort_values(by=['API', 'Text Completion', 'Chat Completion'])
 
 
 
 
 
 
 
 
 
46
  return df
47
 
48
  def display_table(search_query=""):
 
42
  def update_data():
43
  data = get_available_free()
44
  df = pd.DataFrame(data)
45
+
46
+ def custom_sort_status(status):
47
+ if status == "⌀":
48
+ return 1
49
+ elif status == "✓":
50
+ return 0
51
+ else:
52
+ return 2
53
+ df = df.sort_values(by=['API', 'Text Completion', 'Chat Completion'], key=lambda x: (x.map(custom_sort_status), x))
54
+
55
  return df
56
 
57
  def display_table(search_query=""):