refactoring
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ SECRET_KEY = os.environ.get("summarizer")
|
|
9 |
|
10 |
# asynchronous function
|
11 |
async def summarize(text, retries=5):
|
12 |
-
if len(text) <
|
13 |
return "⛔ You text is too short! Please input a longer text for summarization."
|
14 |
headers = {"Authorization": f"Bearer {SECRET_KEY}"}
|
15 |
data = {
|
|
|
9 |
|
10 |
# asynchronous function
|
11 |
async def summarize(text, retries=5):
|
12 |
+
if len(text) < 240:
|
13 |
return "⛔ You text is too short! Please input a longer text for summarization."
|
14 |
headers = {"Authorization": f"Bearer {SECRET_KEY}"}
|
15 |
data = {
|