PFEemp2024 commited on
Commit
f3621b6
·
1 Parent(s): 6d0ac1c

add highlighting to different words

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -281,15 +281,15 @@ if __name__ == "__main__":
281
  """)
282
  ori_text_diff = gr.HighlightedText(
283
  label="The Original Natural Example",
284
- combine_adjacent=True,
285
  )
286
  adv_text_diff = gr.HighlightedText(
287
  label="Character Editions of Adversarial Example Compared to the Natural Example",
288
- combine_adjacent=True,
289
  )
290
  restored_text_diff = gr.HighlightedText(
291
  label="Character Editions of Repaired Adversarial Example Compared to the Natural Example",
292
- combine_adjacent=True,
293
  )
294
 
295
  gr.Markdown(
 
281
  """)
282
  ori_text_diff = gr.HighlightedText(
283
  label="The Original Natural Example",
284
+ combine_adjacent=False,
285
  )
286
  adv_text_diff = gr.HighlightedText(
287
  label="Character Editions of Adversarial Example Compared to the Natural Example",
288
+ combine_adjacent=False,
289
  )
290
  restored_text_diff = gr.HighlightedText(
291
  label="Character Editions of Repaired Adversarial Example Compared to the Natural Example",
292
+ combine_adjacent=False,
293
  )
294
 
295
  gr.Markdown(