youssef1214
commited on
Commit
·
8a5b597
1
Parent(s):
26928da
Update Database.py
Browse files- Database.py +2 -1
Database.py
CHANGED
@@ -31,7 +31,7 @@ all_reviews = db.collection("complaints")
|
|
31 |
documents_to_summarize = all_reviews.get()
|
32 |
feedbacks = db.collection("feedbacks").where("feedbacks","!=",'').get()
|
33 |
allfeedbacks=[]
|
34 |
-
emotioncount={"anger":0,"sadness":0,"joy":0,"surprise":0,"love":0,"sympathy":0,"fear":0}
|
35 |
documents=[]
|
36 |
documnetskey=set()
|
37 |
#get all documents for today that have no summary
|
@@ -161,6 +161,7 @@ def on_snapshotfeedback(doc_snapshot, changes, read_time):
|
|
161 |
elif feedback not in allfeedbacks:
|
162 |
allfeedbacks.append(feedback)
|
163 |
emotioncount[feedback.label]+=1
|
|
|
164 |
|
165 |
callback_donefeedback.set()
|
166 |
docwatch= db.collection("complaints").on_snapshot(on_snapshot,)
|
|
|
31 |
documents_to_summarize = all_reviews.get()
|
32 |
feedbacks = db.collection("feedbacks").where("feedbacks","!=",'').get()
|
33 |
allfeedbacks=[]
|
34 |
+
emotioncount={"anger":0,"sadness":0,"joy":0,"surprise":0,"love":0,"sympathy":0,"fear":0,"count":0}
|
35 |
documents=[]
|
36 |
documnetskey=set()
|
37 |
#get all documents for today that have no summary
|
|
|
161 |
elif feedback not in allfeedbacks:
|
162 |
allfeedbacks.append(feedback)
|
163 |
emotioncount[feedback.label]+=1
|
164 |
+
emotioncount["count"]+=1
|
165 |
|
166 |
callback_donefeedback.set()
|
167 |
docwatch= db.collection("complaints").on_snapshot(on_snapshot,)
|