Spaces:
Sleeping
Sleeping
Update main.py
Browse files
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 |
-
|
|
|
|
| 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
|