Spaces:
Runtime error
Runtime error
quyip
commited on
Commit
·
724f703
1
Parent(s):
d5f14ef
fix
Browse files
main.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
from fastapi import FastAPI, BackgroundTasks
|
2 |
|
3 |
from utils.cache_layer import get_summarize_from_cache, summarize_un_cache_page
|
@@ -23,6 +25,11 @@ async def summary(request: SummaryReq):
|
|
23 |
|
24 |
@app.post("/summaries/")
|
25 |
async def summaries(background_tasks: BackgroundTasks, request: SummariesReq):
|
|
|
|
|
|
|
|
|
|
|
26 |
if request.key != KEY:
|
27 |
return 'Unauthorized'
|
28 |
pages_summaries, uncached_pages = get_summarize_from_cache(request.pages)
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
from fastapi import FastAPI, BackgroundTasks
|
4 |
|
5 |
from utils.cache_layer import get_summarize_from_cache, summarize_un_cache_page
|
|
|
25 |
|
26 |
@app.post("/summaries/")
|
27 |
async def summaries(background_tasks: BackgroundTasks, request: SummariesReq):
|
28 |
+
print(os.environ.get("AccessKey"))
|
29 |
+
print('====================')
|
30 |
+
print(request)
|
31 |
+
print('====================')
|
32 |
+
|
33 |
if request.key != KEY:
|
34 |
return 'Unauthorized'
|
35 |
pages_summaries, uncached_pages = get_summarize_from_cache(request.pages)
|