JavonTeo commited on
Commit
57f4eda
·
1 Parent(s): 5ea2622

Add UI description, functionality.

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -29,10 +29,9 @@ with gr.Blocks(css="#htext span {white-space: pre-line}") as demo:
29
  ctrlsum_file = gr.File(label="Input File")
30
  ctrlsum_str = gr.TextArea(label="Input String", max_lines=5)
31
  with gr.Column():
32
- gr.Markdown("* Set the length of text used for summarization. Length 0 will exert no control over length.")
33
  # ctrlsum_file_beams = gr.Number(label="Number of beams for beam search", value=1, precision=0)
34
  # ctrlsum_file_sequences = gr.Number(label="Number of generated summaries", value=1, precision=0)
35
- ctrlsum_file_length = gr.Radio(label="Length", value=0, choices=[0, 50, 100, 200])
36
  kw = gr.Radio(visible=False)
37
  ctrlsum_file_keywords = gr.Textbox(label="Keywords", max_lines=1)
38
  with gr.Row():
@@ -40,6 +39,8 @@ with gr.Blocks(css="#htext span {white-space: pre-line}") as demo:
40
  ctrlsum_file_output = gr.Textbox(
41
  elem_id="htext",
42
  label="Summary",
 
 
43
  )
44
  ctrlsum_file_examples = gr.Examples(
45
  examples=[["examples/H01-1042_body.txt", 50, "automatic evaluation technique", "", ""],
 
29
  ctrlsum_file = gr.File(label="Input File")
30
  ctrlsum_str = gr.TextArea(label="Input String", max_lines=5)
31
  with gr.Column():
 
32
  # ctrlsum_file_beams = gr.Number(label="Number of beams for beam search", value=1, precision=0)
33
  # ctrlsum_file_sequences = gr.Number(label="Number of generated summaries", value=1, precision=0)
34
+ ctrlsum_file_length = gr.Radio(label="Length", value=0, choices=[0, 50, 100, 200], info="Set the maximum limit for the length of text generated in the output summary. Length 0 implies no restriction on the summary length.")
35
  kw = gr.Radio(visible=False)
36
  ctrlsum_file_keywords = gr.Textbox(label="Keywords", max_lines=1)
37
  with gr.Row():
 
39
  ctrlsum_file_output = gr.Textbox(
40
  elem_id="htext",
41
  label="Summary",
42
+ show_label=True,
43
+ show_copy_button=True
44
  )
45
  ctrlsum_file_examples = gr.Examples(
46
  examples=[["examples/H01-1042_body.txt", 50, "automatic evaluation technique", "", ""],