model links
Browse files
app.py
CHANGED
@@ -53,6 +53,9 @@ def get_model_stats(search_term):
|
|
53 |
# Read the CSV file into a pandas DataFrame
|
54 |
df = pd.read_csv(output_file)
|
55 |
|
|
|
|
|
|
|
56 |
# Create status message with total downloads
|
57 |
status_message = (
|
58 |
f"Found {model_count} models for search term '{search_term}'\n"
|
@@ -80,7 +83,8 @@ with gr.Blocks(title="Hugging Face Model Statistics") as demo:
|
|
80 |
output_table = gr.Dataframe(
|
81 |
headers=["Model ID", "Downloads (30 days)", "Downloads (All Time)"],
|
82 |
datatype=["str", "number", "number"],
|
83 |
-
label="Model Statistics"
|
|
|
84 |
)
|
85 |
status_message = gr.Textbox(label="Status", lines=3) # Increased lines to show all stats
|
86 |
|
|
|
53 |
# Read the CSV file into a pandas DataFrame
|
54 |
df = pd.read_csv(output_file)
|
55 |
|
56 |
+
# Create clickable links for model IDs
|
57 |
+
df['Model ID'] = df['Model ID'].apply(lambda x: f'<a href="https://huggingface.co/{x}" target="_blank">{x}</a>')
|
58 |
+
|
59 |
# Create status message with total downloads
|
60 |
status_message = (
|
61 |
f"Found {model_count} models for search term '{search_term}'\n"
|
|
|
83 |
output_table = gr.Dataframe(
|
84 |
headers=["Model ID", "Downloads (30 days)", "Downloads (All Time)"],
|
85 |
datatype=["str", "number", "number"],
|
86 |
+
label="Model Statistics",
|
87 |
+
wrap=True
|
88 |
)
|
89 |
status_message = gr.Textbox(label="Status", lines=3) # Increased lines to show all stats
|
90 |
|