awacke1 commited on
Commit
b1d0b0e
1 Parent(s): 9089911

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -43,17 +43,16 @@ def selectCollectionDocument(collection, document):
43
  st.write("The contents are: ", doc.to_dict())
44
 
45
  #add data to the beastie with a generic reusable upsert function
46
- def upsertdate(collection, document, firefield, first, last, born):
 
47
  doc_ref = db.collection(collection).document(document)
48
- doc_ref.set({u'firefield': firefield, u'first': first, u'last': last, u'born': born
49
- })
50
 
51
  st.write("singleton stateful connection to cloud firestore")
52
  st.write(u"spin up some awesome 🤯 - episodic and semantic memory 🧠 for AI - here we come")
53
  db = get_db_firestore()
54
 
55
-
56
-
57
  # perceptual system processing agent that can store model
58
  upsert(u'firecollection', u'firedocument', u'users1', u'Ada', u'Lovelace', 1815)
59
  upsert(u'firecollection', u'firedocument', u'users2', u'Aaron', u'Wacker', 1971)
@@ -77,3 +76,10 @@ selectCollectionDocument(u"firecollection3", u"firedocument3")
77
 
78
  # from https://huggingface.co/spaces/awacke1/RealTimeVoiceASR
79
  selectCollectionDocument(u"ASRCollection", u"ASRDocument")
 
 
 
 
 
 
 
 
43
  st.write("The contents are: ", doc.to_dict())
44
 
45
  #add data to the beastie with a generic reusable upsert function
46
+ def upsertoftheminute(collection, document, firefield, first, last, born):
47
+ date_time = now.strftime("%m/%d/%Y, %H:%M")
48
  doc_ref = db.collection(collection).document(document)
49
+ doc_ref.set({u'firefield': firefield, u'first': first, u'last': last, u'born': born, u'minute': date_time})
50
+
51
 
52
  st.write("singleton stateful connection to cloud firestore")
53
  st.write(u"spin up some awesome 🤯 - episodic and semantic memory 🧠 for AI - here we come")
54
  db = get_db_firestore()
55
 
 
 
56
  # perceptual system processing agent that can store model
57
  upsert(u'firecollection', u'firedocument', u'users1', u'Ada', u'Lovelace', 1815)
58
  upsert(u'firecollection', u'firedocument', u'users2', u'Aaron', u'Wacker', 1971)
 
76
 
77
  # from https://huggingface.co/spaces/awacke1/RealTimeVoiceASR
78
  selectCollectionDocument(u"ASRCollection", u"ASRDocument")
79
+
80
+
81
+ upsert(u'firecollection4', u'firedocument4', u'users4', u'🧠🌳Yggdrasil🌳🧠', u'https://github.com/AaronCWacker/Yggdrasil', 2022)
82
+
83
+ # intent - upsert at granularity of minute an aggregate document representing fields used in recent activity to replay shared state memory events
84
+ upsert(u'TimeSeries', u'DocumentofMinute', u'TestUser1', u'🧠🌳Yggdrasil🌳🧠', u'https://github.com/AaronCWacker/Yggdrasil', 2022)
85
+ selectCollectionDocument(u"TimeSeries", u"DocumentofMinute")