banjiola commited on
Commit
b6147ca
·
verified ·
1 Parent(s): e926226

Update app.py

Browse files

corrected the validation step

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -96,7 +96,10 @@ def summarize_ner(text): # I implemented the validation step here because the mo
96
  """
97
  word_count = len(text.split())
98
  if word_count <100:
99
- return "⚠️ Please enter at least 100 words."
 
 
 
100
  else:
101
  summarized = get_completion(text)
102
  # remember I don't have to define a summarization function because the default mode is summarization
 
96
  """
97
  word_count = len(text.split())
98
  if word_count <100:
99
+ return {
100
+ "text": "⚠️ Please enter at least 100 words to use the summarizer.",
101
+ "entities": []
102
+ }
103
  else:
104
  summarized = get_completion(text)
105
  # remember I don't have to define a summarization function because the default mode is summarization