edbeeching commited on
Commit
cacca81
·
1 Parent(s): eb54763

iteration 3, maybe

Browse files
Files changed (1) hide show
  1. app.py +4 -14
app.py CHANGED
@@ -443,9 +443,9 @@ def main():
443
  info="Choose from popular instruction-tuned models under 40B parameters"
444
  )
445
  # model_token = gr.Textbox(label="Model Token (Optional)", type="password", placeholder="Your HF token with read/write access to the model...")
446
- gr.Markdown("### Generation Parameters")
447
  with gr.Row():
448
  system_prompt = gr.Textbox(label="System Prompt (Optional)", lines=3, placeholder="Optional system prompt... e.g., You are a helpful assistant.")
 
449
  with gr.Row():
450
  with gr.Column():
451
  with gr.Row():
@@ -479,16 +479,6 @@ def main():
479
  num_output_samples = gr.Slider(label="Number of samples, leave as '0' for all", value=0, minimum=0, maximum=MAX_SAMPLES_FREE, step=1, interactive=False, info="Click Load Info to populate")
480
 
481
 
482
- # with gr.Group():
483
- # gr.Markdown("## User Information, for notification when your job is completed (still TODO)")
484
- # with gr.Row():
485
- # with gr.Column():
486
- # with gr.Row():
487
- # email = gr.Textbox(label="Email", placeholder="your.email@example.com")
488
- # # with gr.Row():
489
- # # input_dataset_token = gr.Textbox(label="Input dataset token", type="password", placeholder="Your HF token with read access to the input dataset, leave blank if public dataset")
490
- # # output_dataset_token = gr.Textbox(label="Output dataset token", type="password", placeholder="Your HF token with write access to the output dataset")
491
-
492
  submit_btn = gr.Button("Submit Generation Request", variant="primary")
493
  output_status = gr.Textbox(label="Status", interactive=False)
494
 
@@ -590,7 +580,7 @@ def main():
590
  )
591
 
592
  def submit_request(input_dataset_name, input_split, input_dataset_config, output_dataset_name, prompt_col, model_name, sys_prompt,
593
- max_tok, temp, top_k_val, top_p_val, email_addr, num_output_samples, oauth_token=None):
594
 
595
  MASTER_ORG = "synthetic-data-universe/"
596
  model_token = False # This is currently not supported
@@ -619,7 +609,7 @@ def main():
619
  output_dataset_token=output_dataset_token,
620
  num_output_examples=num_output_samples, # will be set after validating the input dataset
621
  username="user",
622
- email=email_addr
623
  )
624
 
625
  # check the input dataset exists and can be accessed with the provided token
@@ -640,7 +630,7 @@ def main():
640
  submit_btn.click(
641
  submit_request,
642
  inputs=[input_dataset_name, input_dataset_split, input_dataset_config, output_dataset_name, prompt_column, model_name_or_path,
643
- system_prompt, max_tokens, temperature, top_k, top_p, email, num_output_samples, current_oauth_token],
644
  outputs=output_status
645
  )
646
 
 
443
  info="Choose from popular instruction-tuned models under 40B parameters"
444
  )
445
  # model_token = gr.Textbox(label="Model Token (Optional)", type="password", placeholder="Your HF token with read/write access to the model...")
 
446
  with gr.Row():
447
  system_prompt = gr.Textbox(label="System Prompt (Optional)", lines=3, placeholder="Optional system prompt... e.g., You are a helpful assistant.")
448
+ gr.Markdown("### Generation Parameters")
449
  with gr.Row():
450
  with gr.Column():
451
  with gr.Row():
 
479
  num_output_samples = gr.Slider(label="Number of samples, leave as '0' for all", value=0, minimum=0, maximum=MAX_SAMPLES_FREE, step=1, interactive=False, info="Click Load Info to populate")
480
 
481
 
 
 
 
 
 
 
 
 
 
 
482
  submit_btn = gr.Button("Submit Generation Request", variant="primary")
483
  output_status = gr.Textbox(label="Status", interactive=False)
484
 
 
580
  )
581
 
582
  def submit_request(input_dataset_name, input_split, input_dataset_config, output_dataset_name, prompt_col, model_name, sys_prompt,
583
+ max_tok, temp, top_k_val, top_p_val, num_output_samples, oauth_token=None):
584
 
585
  MASTER_ORG = "synthetic-data-universe/"
586
  model_token = False # This is currently not supported
 
609
  output_dataset_token=output_dataset_token,
610
  num_output_examples=num_output_samples, # will be set after validating the input dataset
611
  username="user",
612
+ email="n/a",
613
  )
614
 
615
  # check the input dataset exists and can be accessed with the provided token
 
630
  submit_btn.click(
631
  submit_request,
632
  inputs=[input_dataset_name, input_dataset_split, input_dataset_config, output_dataset_name, prompt_column, model_name_or_path,
633
+ system_prompt, max_tokens, temperature, top_k, top_p, num_output_samples, current_oauth_token],
634
  outputs=output_status
635
  )
636