Spaces:
Sleeping
Sleeping
Commit
·
f98590c
1
Parent(s):
a226244
box sizes
Browse files- demo_watermark.py +7 -7
demo_watermark.py
CHANGED
|
@@ -333,20 +333,20 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
|
|
| 333 |
with gr.Tab("Generate and Detect"):
|
| 334 |
|
| 335 |
with gr.Row():
|
| 336 |
-
prompt = gr.Textbox(label=f"Prompt", interactive=True,lines=
|
| 337 |
with gr.Row():
|
| 338 |
generate_btn = gr.Button("Generate")
|
| 339 |
with gr.Row():
|
| 340 |
with gr.Column(scale=2):
|
| 341 |
-
output_without_watermark = gr.Textbox(label="Output Without Watermark", interactive=False,lines=
|
| 342 |
with gr.Column(scale=1):
|
| 343 |
-
# without_watermark_detection_result = gr.Textbox(label="Detection Result", interactive=False,lines=
|
| 344 |
without_watermark_detection_result = gr.Dataframe(headers=["Metric", "Value"], interactive=False,row_count=7,col_count=2)
|
| 345 |
with gr.Row():
|
| 346 |
with gr.Column(scale=2):
|
| 347 |
-
output_with_watermark = gr.Textbox(label="Output With Watermark", interactive=False,lines=
|
| 348 |
with gr.Column(scale=1):
|
| 349 |
-
# with_watermark_detection_result = gr.Textbox(label="Detection Result", interactive=False,lines=
|
| 350 |
with_watermark_detection_result = gr.Dataframe(headers=["Metric", "Value"],interactive=False,row_count=7,col_count=2)
|
| 351 |
|
| 352 |
redecoded_input = gr.Textbox(visible=False)
|
|
@@ -360,9 +360,9 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
|
|
| 360 |
with gr.Tab("Detector Only"):
|
| 361 |
with gr.Row():
|
| 362 |
with gr.Column(scale=2):
|
| 363 |
-
detection_input = gr.Textbox(label="Text to Analyze", interactive=True,lines=
|
| 364 |
with gr.Column(scale=1):
|
| 365 |
-
# detection_result = gr.Textbox(label="Detection Result", interactive=False,lines=
|
| 366 |
detection_result = gr.Dataframe(headers=["Metric", "Value"], interactive=False,row_count=7,col_count=2)
|
| 367 |
with gr.Row():
|
| 368 |
detect_btn = gr.Button("Detect")
|
|
|
|
| 333 |
with gr.Tab("Generate and Detect"):
|
| 334 |
|
| 335 |
with gr.Row():
|
| 336 |
+
prompt = gr.Textbox(label=f"Prompt", interactive=True,lines=10,max_lines=10)
|
| 337 |
with gr.Row():
|
| 338 |
generate_btn = gr.Button("Generate")
|
| 339 |
with gr.Row():
|
| 340 |
with gr.Column(scale=2):
|
| 341 |
+
output_without_watermark = gr.Textbox(label="Output Without Watermark", interactive=False,lines=14,max_lines=14)
|
| 342 |
with gr.Column(scale=1):
|
| 343 |
+
# without_watermark_detection_result = gr.Textbox(label="Detection Result", interactive=False,lines=14,max_lines=14)
|
| 344 |
without_watermark_detection_result = gr.Dataframe(headers=["Metric", "Value"], interactive=False,row_count=7,col_count=2)
|
| 345 |
with gr.Row():
|
| 346 |
with gr.Column(scale=2):
|
| 347 |
+
output_with_watermark = gr.Textbox(label="Output With Watermark", interactive=False,lines=14,max_lines=14)
|
| 348 |
with gr.Column(scale=1):
|
| 349 |
+
# with_watermark_detection_result = gr.Textbox(label="Detection Result", interactive=False,lines=14,max_lines=14)
|
| 350 |
with_watermark_detection_result = gr.Dataframe(headers=["Metric", "Value"],interactive=False,row_count=7,col_count=2)
|
| 351 |
|
| 352 |
redecoded_input = gr.Textbox(visible=False)
|
|
|
|
| 360 |
with gr.Tab("Detector Only"):
|
| 361 |
with gr.Row():
|
| 362 |
with gr.Column(scale=2):
|
| 363 |
+
detection_input = gr.Textbox(label="Text to Analyze", interactive=True,lines=14,max_lines=14)
|
| 364 |
with gr.Column(scale=1):
|
| 365 |
+
# detection_result = gr.Textbox(label="Detection Result", interactive=False,lines=14,max_lines=14)
|
| 366 |
detection_result = gr.Dataframe(headers=["Metric", "Value"], interactive=False,row_count=7,col_count=2)
|
| 367 |
with gr.Row():
|
| 368 |
detect_btn = gr.Button("Detect")
|