THERE WAS A GLITCH WITH THE DEMO. THE DEMO YT VIDEO IS HERE:
https://www.youtube.com/watch?v=5nv3OZIQAGg&feature=youtu.be
Inspiration
Writing comments isn't always easy. Sometimes you're either too caught up in the code, or just apathetic towards anyone who will possibly read the code in the future.
As a result code often doesn't end up being documented at the level it should be, resulting in an unreadable modern legacy application.
To combat this we wanted to create the reverse of Github copilot--an AI that generates comments from code.
What it does
SlashAI is a vscode extension that will generate comments for code snippets written in Golang, Javascript, Python, C, Ruby, Php, and C#.
It is essentially the opposite of Github Copilot.
How we built it
We used a combination of multiple networks including a T5 transofmer, a WordVec model called Sense2Vec, and GPT-2. The T5 transformer dealt with tokenizing the code and extracting a similarity score between our dataset and the code that we had as a sample. We then used WordVec to construct an English sentence by taking weighted values from the comments in our dataset. Finally, we had GPT rewrite that sentence but in English that actually makes sense. The whole thing was deployed to GDC and trained using their A2 GPUs.
Challenges we ran into
Deploying the AI onto the cloud was pretty challenging, especially with regards to setting up the network configuration for our VPS.
Accomplishments that we're proud of
The AI actually works! You'll see in our demo but it is able to generate meaningful comments from very little information.
What we learned
During this hackathon we learned a lot about how much the cloud accelerates the development of AI based applications.
Due to GCP our training of data sets was much easier and faster than if we had done it on our own laptops.
What's next for SlashAI
This product is much more useful than I'd have imagined. I actually want to be able to use this when writing code. As a result, I think we're going to try to sustain this project and open source it so that others can utilize the vscode extension in real time.
Built With
- gcp
- gpt
- javascript
- python
- tensorflow
Log in or sign up for Devpost to join the conversation.