kolaslab commited on
Commit
5e1377b
·
verified ·
1 Parent(s): d0c1a11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -722,14 +722,6 @@ if username:
722
  if kind == "model":
723
  models_count = len(items)
724
  elif kind == "dataset":
725
-
726
-
727
- items = cached_list_items(username, kind)
728
-
729
- # Update counts for radar chart
730
- if kind == "model":
731
- models_count = len(items)
732
- elif kind == "dataset":
733
  datasets_count = len(items)
734
  elif kind == "space":
735
  spaces_count = len(items)
@@ -895,11 +887,11 @@ items = cached_list_items(username, kind)
895
  df_kind = df_kind.drop_duplicates() # Remove any duplicate dates
896
  st.metric(f"{emoji} {label}", total)
897
  st.metric(f"Commits in {selected_year}", commit_count)
898
- make_calendar_heatmap(df_kind, f"{label} Commits", selected_year)
899
  except Exception as e:
900
  st.warning(f"Error processing {label}: {str(e)}")
901
  st.metric(f"{emoji} {label}", 0)
902
  st.metric(f"Commits in {selected_year}", 0)
903
  make_calendar_heatmap(pd.DataFrame(), f"{label} Commits", selected_year)
904
  else:
905
- st.info("Please select an account from the sidebar to view contributions.")
 
722
  if kind == "model":
723
  models_count = len(items)
724
  elif kind == "dataset":
 
 
 
 
 
 
 
 
725
  datasets_count = len(items)
726
  elif kind == "space":
727
  spaces_count = len(items)
 
887
  df_kind = df_kind.drop_duplicates() # Remove any duplicate dates
888
  st.metric(f"{emoji} {label}", total)
889
  st.metric(f"Commits in {selected_year}", commit_count)
890
+ make_calendar_heatmap(df_kind, f"{labels} Commits", selected_year)
891
  except Exception as e:
892
  st.warning(f"Error processing {label}: {str(e)}")
893
  st.metric(f"{emoji} {label}", 0)
894
  st.metric(f"Commits in {selected_year}", 0)
895
  make_calendar_heatmap(pd.DataFrame(), f"{label} Commits", selected_year)
896
  else:
897
+ st.info("Please select an account from the sidebar to view contributions.")