Spaces:
Sleeping
Sleeping
More improvements
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def aggregated_data(df, aggregation_level="week"):
|
|
15 |
df['has_artifact'] = (df['num_models'] > 0) | (df['num_datasets'] > 0) | (df['num_spaces'] > 0)
|
16 |
|
17 |
# Resample by week
|
18 |
-
freq = 'W' if aggregation_level == "week" else '
|
19 |
weekly_total_papers = df.resample(freq).size()
|
20 |
weekly_papers_with_artifacts = df.resample(freq)['has_artifact'].sum()
|
21 |
|
@@ -64,6 +64,14 @@ def display_data(df):
|
|
64 |
column_config={"github": st.column_config.LinkColumn(),
|
65 |
"paper_page": st.column_config.LinkColumn()},
|
66 |
width=2000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
|
69 |
def main():
|
@@ -75,8 +83,8 @@ def main():
|
|
75 |
|
76 |
# TODO use this instead
|
77 |
# df = get_data()
|
78 |
-
df = pd.read_csv('/Users/nielsrogge/Downloads/daily_papers_enriched (
|
79 |
-
df = df.drop(['Unnamed: 0'], axis=1)
|
80 |
# Use date as index
|
81 |
df = df.set_index('date')
|
82 |
df.index = pd.to_datetime(df.index)
|
|
|
15 |
df['has_artifact'] = (df['num_models'] > 0) | (df['num_datasets'] > 0) | (df['num_spaces'] > 0)
|
16 |
|
17 |
# Resample by week
|
18 |
+
freq = 'W' if aggregation_level == "week" else 'ME'
|
19 |
weekly_total_papers = df.resample(freq).size()
|
20 |
weekly_papers_with_artifacts = df.resample(freq)['has_artifact'].sum()
|
21 |
|
|
|
64 |
column_config={"github": st.column_config.LinkColumn(),
|
65 |
"paper_page": st.column_config.LinkColumn()},
|
66 |
width=2000)
|
67 |
+
|
68 |
+
st.write("Papers with a HF mention in README but no artifacts")
|
69 |
+
st.dataframe(df[(df['hf_mention'] == 1) & (~df['has_artifact'])],
|
70 |
+
hide_index=True,
|
71 |
+
column_order=("paper_page", "title", "github", "num_models", "num_datasets", "num_spaces"),
|
72 |
+
column_config={"github": st.column_config.LinkColumn(),
|
73 |
+
"paper_page": st.column_config.LinkColumn()},
|
74 |
+
width=2000)
|
75 |
|
76 |
|
77 |
def main():
|
|
|
83 |
|
84 |
# TODO use this instead
|
85 |
# df = get_data()
|
86 |
+
df = pd.read_csv('/Users/nielsrogge/Downloads/daily_papers_enriched (3).csv')
|
87 |
+
df = df.drop(['Unnamed: 0'], axis=1) if 'Unnamed: 0' in df.columns else df
|
88 |
# Use date as index
|
89 |
df = df.set_index('date')
|
90 |
df.index = pd.to_datetime(df.index)
|