This product is our team's entry to HackTrinity 2024 GenAI x Legal, where it won the Most Viable Product (MVP) prize. We built a web application that provides instant summary of live cases, AI opinion on the cases and allows users to bet on the outcome of the case.
Setting up local instances:
You must have a PERPLEXITY_API_KEY defined in api/.env for this to work.
## installation
$ cd live-app-sum
$ npm install
$ cd ..
$ python3 -m venv .venv
$ pip install -r requirements.txt
$ source .venv/bin/activate
## running the services requires three terminal windows
### window 1
$ npm run start --prefix=live-app-sum
### window 2
$ cd bet
$ python betserver.py
### window 3
$ cd api
$ python app.pyGo to http://localhost:3000 and select a case.
The intention of this is to work with a live video / audio stream that is processed on the fly. For our proof of concept, we load the audio file of one of OJ Simpson's court appearances (api/oj1.wav). This file was 2 hours long so is processed in chunks of 1 minute. Each chunk is sent to a perplexity model (llama-3.1-sonar-large-128k-online) for a summary. Once a summary is completed, it is sent via a websocket notification to any clients subscribed to this particular court case. At the same time, the summaries are piped to the same model with a different prompt to provide an "AI expert opinion". These opinions are also published to the clients with websockets.
