Davidsamuel101 commited on
Commit
189657b
1 Parent(s): 08be207

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -25,11 +25,9 @@ def summarize(slides):
25
  for idx, (tag, content) in enumerate(contents):
26
  if tag.startswith('p'):
27
  try:
28
- print(f"Content: {content}")
29
  input = tokenizer(content, truncation=True, padding="longest", return_tensors="pt").to(device)
30
  tensor = model.generate(**input)
31
  summary = tokenizer.batch_decode(tensor, skip_special_tokens=True)[0]
32
- print(f"Summary: {summary}")
33
  contents[idx] = (tag, summary)
34
  except Exception as e:
35
  print(e)
 
25
  for idx, (tag, content) in enumerate(contents):
26
  if tag.startswith('p'):
27
  try:
 
28
  input = tokenizer(content, truncation=True, padding="longest", return_tensors="pt").to(device)
29
  tensor = model.generate(**input)
30
  summary = tokenizer.batch_decode(tensor, skip_special_tokens=True)[0]
 
31
  contents[idx] = (tag, summary)
32
  except Exception as e:
33
  print(e)