This is a Streamlit app we made to compete in MHacks 16 in Ann Arbor. The goal was to use Google Gemini 1.5 and do something with generative AI, and Gemini's 1 million token context window. We loaded books from Gutenberg and had Gemini analyze them and return a series of emotions, as well as a ranking of that emotion. The next step was to draw a squiggle as search input to represent the emotional arc you would like to see in a book, and then return those books that are closest. We wanted Gemini to interpret the drawn squiggle, but it struggled, so we fell back on the PIL library. Source code is in GitHub
Neo4j Patent Schema This is the schema in a Neo4j graph database we created in order to make a search engine. ~one million patents were loaded locally from USPTO bulk data files.
This was my first real attempt at using Jupyter notebooks, and I decided to see if I could find how many new high and low temperature records were being set over time.
# Choose trained Weka BIFXML file
xmlfile ="D:/weka/iris.xml"# created with BayesNet, MaxNrParents=2, BIFXML file
bifreader = JavaObject(JavaObject.new_instance("weka.classifiers.bayes.net.BIFReader"))
editable = Classifier(jobject=javabridge.make_instance("weka/classifiers/bayes/net/EditableBayesNet","(Lweka/classifiers/bayes/net/BIFReader;)V",
bifreader.jwrapper.processFile(xmlfile)))# We need to calculate the margins of all the attributes
marginCalc = JavaObject(JavaObject.new_instance("weka.classifiers.bayes.net.MarginCalculator"))
marginCalc.jwrapper.calcMargins(editable.jobject)
marginCalcNoEvidence = Serial.deepcopy(marginCalc)# could maybe get by without this, just use marginCalc()
1
2
3
4
5
6
7
8
9
10
11
12
13
This is a simple project showing how in Python to call the BayesNet classifier provided by Weka. A relevant Google Groups discussion is here