Someman commited on
Commit
0b48e62
1 Parent(s): 06b4881

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -38,12 +38,14 @@ def title_generation(input: str):
38
 
39
 
40
  def generate(task: str, input: str):
41
- if task == SUMMARIZATION:
42
- return summarization(input)
43
- elif task == TITLE_GENERATION:
44
- return title_generation(input)
45
- else:
46
- return "Wow! Very Dangerous!"
 
 
47
 
48
 
49
  demo = gr.Interface(
 
38
 
39
 
40
  def generate(task: str, input: str):
41
+ if len(input) < 20:
42
+ if task == SUMMARIZATION:
43
+ return summarization(input)
44
+ elif task == TITLE_GENERATION:
45
+ return title_generation(input)
46
+ else:
47
+ return "Wow! Very Dangerous!"
48
+ return "Enter something meaningful."
49
 
50
 
51
  demo = gr.Interface(