kz209 commited on
Commit
cc93727
1 Parent(s): 5f75abd
Files changed (1) hide show
  1. pages/summarization_playground.py +3 -2
pages/summarization_playground.py CHANGED
@@ -117,7 +117,7 @@ def generate_answer(sources, model_name, prompt, temperature, max_new_tokens, do
117
  def process_input(input_text, model_selection, prompt, temperature, max_new_tokens, do_sample):
118
  if input_text:
119
  logging.info("Start generation")
120
- response = generate_answer(input_text, model_selection, prompt)
121
  return f"## Original Dialogue:\n\n{input_text}\n\n## Summarization:\n\n{response}"
122
  else:
123
  return "Please fill the input to generate outputs."
@@ -149,7 +149,8 @@ def create_summarization_interface():
149
  temperature = gr.Textbox(label="Temperature",elem_classes="parameter-text", value=0.0)
150
  max_new_tokens = gr.Textbox(label="Max New Tokens",elem_classes="parameter-text", value=500)
151
  do_sample = gr.Dropdown([True,False],label="Do Sample",elem_classes="parameter-text", value=True)
152
- output = gr.Markdown(line_breaks=True)
 
153
 
154
  example_dropdown.change(update_input, inputs=[example_dropdown], outputs=[input_text])
155
  submit_button.click(process_input, inputs=[input_text,model_dropdown,Template_text,temperature,max_new_tokens,do_sample], outputs=[output])
 
117
  def process_input(input_text, model_selection, prompt, temperature, max_new_tokens, do_sample):
118
  if input_text:
119
  logging.info("Start generation")
120
+ response = generate_answer(input_text, model_selection, prompt, temperature, max_new_tokens, do_sample)
121
  return f"## Original Dialogue:\n\n{input_text}\n\n## Summarization:\n\n{response}"
122
  else:
123
  return "Please fill the input to generate outputs."
 
149
  temperature = gr.Textbox(label="Temperature",elem_classes="parameter-text", value=0.0)
150
  max_new_tokens = gr.Textbox(label="Max New Tokens",elem_classes="parameter-text", value=500)
151
  do_sample = gr.Dropdown([True,False],label="Do Sample",elem_classes="parameter-text", value=True)
152
+ with gr.Column(scale=3):
153
+ output = gr.Markdown(line_breaks=True)
154
 
155
  example_dropdown.change(update_input, inputs=[example_dropdown], outputs=[input_text])
156
  submit_button.click(process_input, inputs=[input_text,model_dropdown,Template_text,temperature,max_new_tokens,do_sample], outputs=[output])