leandro commited on
Commit
4230709
1 Parent(s): c0d4831

tweak info text

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -130,7 +130,7 @@ norm_probs, sorted_token_ids = calculate_scores(probs.numpy(), inputs["input_ids
130
  if len(inputs['input_ids'])>1024:
131
  st.warning("Your input is longer than the maximum 1024 tokens and will be truncated.")
132
  st.sidebar.title("Info:")
133
- st.sidebar.markdown("This demo uses CodeParrot to highlight the parts of code with low probability. Since CodeParrot is an autoregressive model the tokens at the beginning tend to have a lower probability. E.g. the model can't know what you want to import because it has no access to information later in the code. However, as you can see in the example on the right it still can highlight bugs or unconventional naming. Below is an example of how a correct solution might look like. Try to copy paste it and press **CMD + Enter** to update the highlighting.")
134
  st.sidebar.title("Settings:")
135
  if st.sidebar.radio("Highlight mode:", ["Probability heuristics", "Scaled loss per token"]) == "Probability heuristics":
136
  scores = norm_probs
 
130
  if len(inputs['input_ids'])>1024:
131
  st.warning("Your input is longer than the maximum 1024 tokens and will be truncated.")
132
  st.sidebar.title("Info:")
133
+ st.sidebar.markdown("This demo uses CodeParrot to highlight the parts of code with low probability. Since CodeParrot is an autoregressive model the tokens at the beginning tend to have a lower probability. E.g. the model can't know what you want to import because it has no access to information later in the code. However, as you can see in the example on the right it still can highlight bugs or unconventional naming.\n\nAt the bottom of the page is an example of how a better solution might look like. Try to copy paste it and press **CMD + Enter** to update the highlighting.")
134
  st.sidebar.title("Settings:")
135
  if st.sidebar.radio("Highlight mode:", ["Probability heuristics", "Scaled loss per token"]) == "Probability heuristics":
136
  scores = norm_probs