gregorlied commited on
Commit
2561726
Β·
verified Β·
1 Parent(s): 2cde63b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -107,6 +107,7 @@ def summarize(text):
107
  # top_p=0.9,
108
  # do_sample=True,
109
  # temperature=0.6,
 
110
  max_new_tokens=2048,
111
  logits_processor=[xgr_logits_processor]
112
  )
@@ -116,7 +117,7 @@ def summarize(text):
116
  ]
117
 
118
  response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
119
- return response
120
 
121
  with gr.Blocks() as demo:
122
  gr.Markdown("## πŸ“ Structured Information Extraction for Clinical Reports")
@@ -174,7 +175,7 @@ with gr.Blocks() as demo:
174
  fn=summarize,
175
  inputs=input_text,
176
  outputs=output_text,
177
- cache_examples="lazy",
178
  )
179
 
180
  summarize_btn.click(
 
107
  # top_p=0.9,
108
  # do_sample=True,
109
  # temperature=0.6,
110
+ min_new_tokens=50,
111
  max_new_tokens=2048,
112
  logits_processor=[xgr_logits_processor]
113
  )
 
117
  ]
118
 
119
  response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
120
+ return response[0]
121
 
122
  with gr.Blocks() as demo:
123
  gr.Markdown("## πŸ“ Structured Information Extraction for Clinical Reports")
 
175
  fn=summarize,
176
  inputs=input_text,
177
  outputs=output_text,
178
+ # cache_examples="lazy",
179
  )
180
 
181
  summarize_btn.click(