reshinthadith commited on
Commit
5034b4e
·
1 Parent(s): 5a14023

Update app.py

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