Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -43,14 +43,15 @@ def update_data():
|
|
43 |
data = get_available_free()
|
44 |
df = pd.DataFrame(data)
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
df = df
|
|
|
54 |
|
55 |
return df
|
56 |
|
|
|
43 |
data = get_available_free()
|
44 |
df = pd.DataFrame(data)
|
45 |
|
46 |
+
status_mapping = {"✓": 0, "⌀": 1, "---": 2}
|
47 |
+
|
48 |
+
df['Text Completion'] = df['Text Completion'].map(status_mapping)
|
49 |
+
df['Chat Completion'] = df['Chat Completion'].map(status_mapping)
|
50 |
+
|
51 |
+
df = df.sort_values(by=['API', 'Text Completion', 'Chat Completion'])
|
52 |
+
|
53 |
+
df['Text Completion'] = df['Text Completion'].map({v: k for k, v in status_mapping.items()})
|
54 |
+
df['Chat Completion'] = df['Chat Completion'].map({v: k for k, v in status_mapping.items()})
|
55 |
|
56 |
return df
|
57 |
|