Remove first line for summ

#18
by JavonTeo - opened
Files changed (2) hide show
  1. controlled_summarization.py +2 -0
  2. description.py +0 -2
controlled_summarization.py CHANGED
@@ -80,6 +80,8 @@ def ctrlsum_for_file(input=None, length=None, keywords="", text="", url="") -> L
80
  output = []
81
  for res in results["summary"]:
82
  output.append(f"{res}\n\n")
 
 
83
  return "".join(output), results["raw_text"], filename
84
 
85
 
 
80
  output = []
81
  for res in results["summary"]:
82
  output.append(f"{res}\n\n")
83
+ if results["raw_text"] == "":
84
+ return "Unable to parse File, please try with a different file!", None, filename # if file parsing does not have any output string
85
  return "".join(output), results["raw_text"], filename
86
 
87
 
description.py CHANGED
@@ -44,8 +44,6 @@ To **test on strings**, simply input a string.
44
  '''
45
 
46
  ctrlsum_file_md = '''
47
- This is the demo for **CocoSciSum**.
48
-
49
  ## Controlled Summarization uses FLAN-T5 to generate user-customised summaries from your input file or URL link.
50
 
51
  To **test on a file**, the input can be:
 
44
  '''
45
 
46
  ctrlsum_file_md = '''
 
 
47
  ## Controlled Summarization uses FLAN-T5 to generate user-customised summaries from your input file or URL link.
48
 
49
  To **test on a file**, the input can be: