Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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=""):
|