jwkirchenbauer commited on
Commit
3ab266f
1 Parent(s): c677654

default prompt and disclaimer vis by default

Browse files
Files changed (1) hide show
  1. demo_watermark.py +4 -2
demo_watermark.py CHANGED
@@ -337,7 +337,7 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
337
  """
338
  )
339
 
340
- with gr.Accordion("A note on model capability",open=False):
341
  gr.Markdown(
342
  """
343
  The models that can be used in this demo are limited to those that are both open source and that fit on a single commodity GPU.
@@ -356,7 +356,7 @@ def run_gradio(args, model=None, device=None, tokenizer=None):
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)
360
  with gr.Row():
361
  generate_btn = gr.Button("Generate")
362
  with gr.Row():
@@ -618,6 +618,8 @@ def main(args):
618
  "feet.[9] The species is"
619
  )
620
 
 
 
621
  term_width = 80
622
  print("#"*term_width)
623
  print("Prompt:")
 
337
  """
338
  )
339
 
340
+ with gr.Accordion("A note on model capability",open=True):
341
  gr.Markdown(
342
  """
343
  The models that can be used in this demo are limited to those that are both open source and that fit on a single commodity GPU.
 
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=args.default_prompt)
360
  with gr.Row():
361
  generate_btn = gr.Button("Generate")
362
  with gr.Row():
 
618
  "feet.[9] The species is"
619
  )
620
 
621
+ args.default_prompt = input_text
622
+
623
  term_width = 80
624
  print("#"*term_width)
625
  print("Prompt:")