quyip commited on
Commit
b4d4150
·
1 Parent(s): b36806c
Files changed (1) hide show
  1. main.py +5 -5
main.py CHANGED
@@ -25,14 +25,14 @@ async def summary(request: SummaryReq):
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)
 
 
 
36
  background_tasks.add_task(summarize_un_cache_page, uncached_pages)
37
  return pages_summaries
38
 
 
25
 
26
  @app.post("/summaries/")
27
  async def summaries(background_tasks: BackgroundTasks, request: SummariesReq):
 
 
28
  print(request)
29
+ print('====================1')
30
+ if request.key != os.environ.get("AccessKey"):
 
31
  return 'Unauthorized'
32
  pages_summaries, uncached_pages = get_summarize_from_cache(request.pages)
33
+ print(pages_summaries)
34
+ print(uncached_pages)
35
+ print('====================2')
36
  background_tasks.add_task(summarize_un_cache_page, uncached_pages)
37
  return pages_summaries
38