loubnabnl HF Staff commited on
Commit
935669c
·
1 Parent(s): c2c2487

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,15 +12,15 @@ def load_data():
12
 
13
  def print_issue(events):
14
  for event in events:
15
- print("-" * 75)
16
  masked_author = f"masked as {event['masked_author']}" if "masked_author" in event else ""
17
- st.write(f"author: {event['author']} {masked_author}, {event['action']} {event['type']}: {event['title']}")
18
- st.write(f"text: {event['text']}")
19
 
20
  samples = load_data()
21
  col1, _ = st.columns([2, 4])
22
  with col1:
23
- index_example = st.number_input(f"Index of the chosen example from the existing {len(samples)}", min_value=0, max_value=max_docs-1, value=0, step=1)
24
 
25
  st.write(f"Issue size: {samples[index_example]['text_size_bots']}\n\n")
26
  print_issue(samples[index_example]["old_events"])
 
12
 
13
  def print_issue(events):
14
  for event in events:
15
+ st.markdown("""---""")
16
  masked_author = f"masked as {event['masked_author']}" if "masked_author" in event else ""
17
+ st.markdown(f"**Author:** {event['author']} {masked_author}, {event['action']} {event['type']} with title: {event['title']}\n Text:")
18
+ st.code(f"{event['text']}", language="html")
19
 
20
  samples = load_data()
21
  col1, _ = st.columns([2, 4])
22
  with col1:
23
+ index_example = st.number_input(f"Index of the chosen example from the existing {len(samples)}", min_value=0, max_value=len(samples)-1, value=0, step=1)
24
 
25
  st.write(f"Issue size: {samples[index_example]['text_size_bots']}\n\n")
26
  print_issue(samples[index_example]["old_events"])