Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,12 +38,14 @@ def title_generation(input: str):
|
|
38 |
|
39 |
|
40 |
def generate(task: str, input: str):
|
41 |
-
if
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
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(
|