jwkirchenbauer commited on
Commit
a226244
·
1 Parent(s): a982455

detect tab output bug

Browse files
Files changed (1) hide show
  1. demo_watermark.py +5 -5
demo_watermark.py CHANGED
@@ -479,23 +479,23 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
479
  gamma.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
480
  gamma.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
481
  gamma.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
482
- gamma.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_input,session_args])
483
  detection_z_threshold.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
484
  detection_z_threshold.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
485
  detection_z_threshold.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
486
- detection_z_threshold.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_input,session_args])
487
  ignore_repeated_bigrams.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
488
  ignore_repeated_bigrams.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
489
  ignore_repeated_bigrams.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
490
- ignore_repeated_bigrams.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_input,session_args])
491
  normalizers.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
492
  normalizers.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
493
  normalizers.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
494
- normalizers.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_input,session_args])
495
  select_green_tokens.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
496
  select_green_tokens.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
497
  select_green_tokens.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
498
- select_green_tokens.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_input,session_args])
499
 
500
 
501
  demo.queue(concurrency_count=3)
 
479
  gamma.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
480
  gamma.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
481
  gamma.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
482
+ gamma.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_result,session_args])
483
  detection_z_threshold.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
484
  detection_z_threshold.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
485
  detection_z_threshold.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
486
+ detection_z_threshold.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_result,session_args])
487
  ignore_repeated_bigrams.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
488
  ignore_repeated_bigrams.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
489
  ignore_repeated_bigrams.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
490
+ ignore_repeated_bigrams.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_result,session_args])
491
  normalizers.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
492
  normalizers.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
493
  normalizers.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
494
+ normalizers.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_result,session_args])
495
  select_green_tokens.change(lambda value: str(value), inputs=[session_args], outputs=[current_parameters])
496
  select_green_tokens.change(fn=detect_partial, inputs=[output_without_watermark,session_args], outputs=[without_watermark_detection_result,session_args])
497
  select_green_tokens.change(fn=detect_partial, inputs=[output_with_watermark,session_args], outputs=[with_watermark_detection_result,session_args])
498
+ select_green_tokens.change(fn=detect_partial, inputs=[detection_input,session_args], outputs=[detection_result,session_args])
499
 
500
 
501
  demo.queue(concurrency_count=3)