Spaces:
Sleeping
Sleeping
jwkirchenbauer
commited on
Commit
•
c958b82
1
Parent(s):
e1751c9
pop default prompt from args before running
Browse files- demo_watermark.py +2 -1
demo_watermark.py
CHANGED
@@ -352,11 +352,12 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
|
|
352 |
|
353 |
# Construct state for parameters, define updates and toggles
|
354 |
session_args = gr.State(value=args)
|
|
|
355 |
|
356 |
with gr.Tab("Generate and Detect"):
|
357 |
|
358 |
with gr.Row():
|
359 |
-
prompt = gr.Textbox(label=f"Prompt", interactive=True,lines=10,max_lines=10, value=
|
360 |
with gr.Row():
|
361 |
generate_btn = gr.Button("Generate")
|
362 |
with gr.Row():
|
|
|
352 |
|
353 |
# Construct state for parameters, define updates and toggles
|
354 |
session_args = gr.State(value=args)
|
355 |
+
default_prompt = args.__dict__.pop("default_prompt")
|
356 |
|
357 |
with gr.Tab("Generate and Detect"):
|
358 |
|
359 |
with gr.Row():
|
360 |
+
prompt = gr.Textbox(label=f"Prompt", interactive=True,lines=10,max_lines=10, value=default_prompt)
|
361 |
with gr.Row():
|
362 |
generate_btn = gr.Button("Generate")
|
363 |
with gr.Row():
|