Spaces:
Runtime error
Runtime error
quyip
commited on
Commit
·
76b0647
1
Parent(s):
0917f84
fix
Browse files
main.py
CHANGED
@@ -43,11 +43,11 @@ async def summaries(request: SummariesReq):
|
|
43 |
if request.key != KEY:
|
44 |
return 'Unauthorized'
|
45 |
result = []
|
46 |
-
print('process pages:
|
47 |
for page in request.pages:
|
48 |
try:
|
49 |
print(page['id'])
|
50 |
-
result.append(
|
51 |
except Exception as e:
|
52 |
print(e)
|
53 |
return result
|
|
|
43 |
if request.key != KEY:
|
44 |
return 'Unauthorized'
|
45 |
result = []
|
46 |
+
print(f'process pages: {len(request.pages)}')
|
47 |
for page in request.pages:
|
48 |
try:
|
49 |
print(page['id'])
|
50 |
+
result.append(summarize(page['id'], page['text']))
|
51 |
except Exception as e:
|
52 |
print(e)
|
53 |
return result
|