aamirtaymoor commited on
Commit
635cab1
·
verified ·
1 Parent(s): e89c367

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -1
main.py CHANGED
@@ -10,6 +10,7 @@ from kafka import KafkaConsumer, KafkaProducer
10
  import asyncio
11
  import json
12
  import pandas as pd
 
13
 
14
 
15
  app = FastAPI()
@@ -75,7 +76,8 @@ def predict_file_responses(file: UploadFile = File(...)):
75
  review_id = row['REVIEWID']
76
  raw_data = {"text":text, "star_rating":star_rating, "skip":False}
77
  processed_data, has_sentiments = process_single_comment(raw_data)
78
- print(f"Processed review with index {index}")
 
79
  processed_data_list.append({"processed_data":processed_data, "has_sentiments":has_sentiments, "review_id":review_id})
80
  finally:
81
  pass
 
10
  import asyncio
11
  import json
12
  import pandas as pd
13
+ from datetime import datetime
14
 
15
 
16
  app = FastAPI()
 
76
  review_id = row['REVIEWID']
77
  raw_data = {"text":text, "star_rating":star_rating, "skip":False}
78
  processed_data, has_sentiments = process_single_comment(raw_data)
79
+ now = datetime.now()
80
+ print(f"Processed review with index {index} at time {now.time()}")
81
  processed_data_list.append({"processed_data":processed_data, "has_sentiments":has_sentiments, "review_id":review_id})
82
  finally:
83
  pass