Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,12 +93,15 @@ def display_table(search_query="", filters=[], use_cache=False):
|
|
| 93 |
filtered_df = df
|
| 94 |
|
| 95 |
if filters:
|
| 96 |
-
if "Free"
|
| 97 |
-
|
|
|
|
| 98 |
if "Text Completion" in filters:
|
| 99 |
filtered_df = filtered_df[filtered_df["Text Completion"] == "β"]
|
| 100 |
if "Chat Completion" in filters:
|
| 101 |
filtered_df = filtered_df[filtered_df["Chat Completion"] == "β"]
|
|
|
|
|
|
|
| 102 |
|
| 103 |
styled_df = filtered_df.style.apply(apply_row_styles, axis=1, subset=["Model", "API", "Text Completion", "Chat Completion", "Vision"])
|
| 104 |
return styled_df
|
|
@@ -157,7 +160,7 @@ with gr.Blocks() as demo:
|
|
| 157 |
gr.Markdown("## HF Serverless LLM Inference API Status")
|
| 158 |
gr.Markdown(description)
|
| 159 |
search_box = gr.Textbox(label="Search for a model", placeholder="Type model name here...")
|
| 160 |
-
filter_box = gr.CheckboxGroup(choices=["Free", "Text Completion", "Chat Completion"], label="Filters")
|
| 161 |
table = gr.Dataframe(value=display_table(use_cache=True), headers="keys")
|
| 162 |
|
| 163 |
def update_filters(query, filters):
|
|
|
|
| 93 |
filtered_df = df
|
| 94 |
|
| 95 |
if filters:
|
| 96 |
+
api_filters = [f for f in filters if f in ["Free", "Pro Subscription", "Not Responding"]]
|
| 97 |
+
if api_filters:
|
| 98 |
+
filtered_df = filtered_df[filtered_df["API"].isin(api_filters)]
|
| 99 |
if "Text Completion" in filters:
|
| 100 |
filtered_df = filtered_df[filtered_df["Text Completion"] == "β"]
|
| 101 |
if "Chat Completion" in filters:
|
| 102 |
filtered_df = filtered_df[filtered_df["Chat Completion"] == "β"]
|
| 103 |
+
if "Vision" in filters:
|
| 104 |
+
filtered_df = filtered_df[filtered_df["Vision"] == "β"]
|
| 105 |
|
| 106 |
styled_df = filtered_df.style.apply(apply_row_styles, axis=1, subset=["Model", "API", "Text Completion", "Chat Completion", "Vision"])
|
| 107 |
return styled_df
|
|
|
|
| 160 |
gr.Markdown("## HF Serverless LLM Inference API Status")
|
| 161 |
gr.Markdown(description)
|
| 162 |
search_box = gr.Textbox(label="Search for a model", placeholder="Type model name here...")
|
| 163 |
+
filter_box = gr.CheckboxGroup(choices=["Free", "Pro Subscription", "Not Responding", "Text Completion", "Chat Completion", "Vision"], label="Filters")
|
| 164 |
table = gr.Dataframe(value=display_table(use_cache=True), headers="keys")
|
| 165 |
|
| 166 |
def update_filters(query, filters):
|