reshinthadith commited on
Commit
8e50efb
1 Parent(s): f9173b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -41,16 +41,17 @@ def load_page(split):
41
  meta = data["meta"]
42
  with st.expander("Render Content"):
43
  st.write(content)
44
- with st.expander("Render Content"):
45
  st.text(content)
46
- st.write("### Meta:")
47
- st.write(ast.literal_eval(meta))
48
- # Tokenizer-related count
49
- tokenized = tokenizer(content, return_length=True)['length'][0]
50
- token_count_metric = st.metric("Token Count(compared to 2048)",value=tokenized,delta=4096-tokenized)
51
- #Word related count
52
- split_words = re.findall(r'\w+', content)
53
- word_count_metric = st.metric("Word Count",value=len(split_words))
 
54
 
55
 
56
 
 
41
  meta = data["meta"]
42
  with st.expander("Render Content"):
43
  st.write(content)
44
+ with st.expander("Raw Content"):
45
  st.text(content)
46
+ with st.expander("Metadata and Metrics"):
47
+ st.write("### Meta:")
48
+ st.write(ast.literal_eval(meta))
49
+ # Tokenizer-related count
50
+ tokenized = tokenizer(content, return_length=True)['length'][0]
51
+ token_count_metric = st.metric("Token Count(compared to 2048)",value=tokenized,delta=4096-tokenized)
52
+ #Word related count
53
+ split_words = re.findall(r'\w+', content)
54
+ word_count_metric = st.metric("Word Count",value=len(split_words))
55
 
56
 
57