Omkar008 commited on
Commit
75432dc
·
verified ·
1 Parent(s): e93675d

Update extract_insights.py

Browse files
Files changed (1) hide show
  1. extract_insights.py +13 -13
extract_insights.py CHANGED
@@ -18,24 +18,24 @@ key: str = os.getenv('SUPABASE_KEY')
18
  supabase: Client = create_client(url, key)
19
 
20
 
21
- @app.post("/send/synchronous_processing")
22
- async def testv1(request: Request, background_tasks: BackgroundTasks):
23
- try:
24
- body_data = await request.json()
25
- user_id = body_data.get("user_id")
26
- email = body_data.get("email")
27
- message_id = body_data.get("message_id")
28
- raw_text = body_data.get("raw_text")
29
 
30
- # Add processing to background tasks
31
- background_tasks.add_task(process_synchronous_job, user_id,email,message_id,raw_text)
32
 
33
- return {'data': 'Batch job is scheduled!'}
34
 
35
 
36
 
37
- except Exception as e:
38
- return {'error': str(e)}
39
 
40
 
41
  # def receipt_radar_prompt(raw_text:str)->str:
 
18
  supabase: Client = create_client(url, key)
19
 
20
 
21
+ # @app.post("/send/synchronous_processing")
22
+ # async def testv1(request: Request, background_tasks: BackgroundTasks):
23
+ # try:
24
+ # body_data = await request.json()
25
+ # user_id = body_data.get("user_id")
26
+ # email = body_data.get("email")
27
+ # message_id = body_data.get("message_id")
28
+ # raw_text = body_data.get("raw_text")
29
 
30
+ # # Add processing to background tasks
31
+ # background_tasks.add_task(process_synchronous_job, user_id,email,message_id,raw_text)
32
 
33
+ # return {'data': 'Batch job is scheduled!'}
34
 
35
 
36
 
37
+ # except Exception as e:
38
+ # return {'error': str(e)}
39
 
40
 
41
  # def receipt_radar_prompt(raw_text:str)->str: