harmdevries commited on
Commit
5f3e835
1 Parent(s): 9580055

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,7 +4,7 @@ import pandas as pd
4
  from datasets import load_dataset
5
 
6
  st.set_page_config(page_title="The Stack data Inspection", layout="wide")
7
- st.title("The Stack data Inspection")
8
 
9
  df = pd.read_csv("extension_distribution.csv")
10
  all_extensions = df["extension"].tolist()
@@ -27,7 +27,7 @@ def load_data(language, ext):
27
  return ds
28
 
29
 
30
- col1, col2, _ = st.columns([1, 1, 4])
31
  with col1:
32
  chosen_language = st.selectbox(
33
  label="Select a programming language", options=all_languages, index=0
@@ -47,11 +47,11 @@ indexes_not_lexed = not_lexed["idx"]
47
 
48
 
49
  # info about extension
50
- st.markdown("### Information about the extension:")
51
  text = f"Extension {chosen_ext} has {max_docs} files, {df[df['extension'] == chosen_ext]['low_alphanum_count'].values[0]} with very low alphanumeric ratio, \
52
  {df[df['extension'] == chosen_ext]['long_lines_count'].values[0]} with very long lines, and {df[df['extension'] == chosen_ext]['non_lexable_count'].values[0]} \
53
  are not lexable.\n These files are at indexes:\n {indexes_not_lexed}."
54
- st.markdown(text)
55
 
56
  col_1, _ = st.columns([2, 4])
57
  with col_1:
 
4
  from datasets import load_dataset
5
 
6
  st.set_page_config(page_title="The Stack data Inspection", layout="wide")
7
+ st.sidebar.title("The Stack data Inspection")
8
 
9
  df = pd.read_csv("extension_distribution.csv")
10
  all_extensions = df["extension"].tolist()
 
27
  return ds
28
 
29
 
30
+ col1, col2, _ = st.sidebar.columns([1, 1, 4])
31
  with col1:
32
  chosen_language = st.selectbox(
33
  label="Select a programming language", options=all_languages, index=0
 
47
 
48
 
49
  # info about extension
50
+ st.sidebar.markdown("### Information about the extension:")
51
  text = f"Extension {chosen_ext} has {max_docs} files, {df[df['extension'] == chosen_ext]['low_alphanum_count'].values[0]} with very low alphanumeric ratio, \
52
  {df[df['extension'] == chosen_ext]['long_lines_count'].values[0]} with very long lines, and {df[df['extension'] == chosen_ext]['non_lexable_count'].values[0]} \
53
  are not lexable.\n These files are at indexes:\n {indexes_not_lexed}."
54
+ st.sidebar.markdown(text)
55
 
56
  col_1, _ = st.columns([2, 4])
57
  with col_1: