Skip to content

iedmrc/galois-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Galois Autocompleter

Online Editor for Galois Autocompleter

Version Twitter: iedmrc

An online code editor (playground) for Galois.

Galois is an auto code completer for code editors (or any text editor) based on OpenAI GPT-2. It is trained (finetuned) on a curated list of approximately 45K Python (~470MB) files gathered from the Github. It is now just works properly on Python but not bad at other languages (thanks to GPT-2's power).

This repository contains an online code editor crafted with vue-prism-editor and tribute.

Installation

You can install and run this repository with or without Docker. This repository only contains the Web API's for Galois. You should also need to install Galois Autocompleter to enjoy with the autocompleter.

With Docker

Either clone the repository and build the image from docker file or directly run the following command:

docker run --rm -dit -p 3003:3003 --env-file backend/.env iedmrc/galois-web

Don't forget to provide a valid environment file. You can find an example environment file at backend directory.

Without Docker

Clone the repository and build the vue frontend with:

npm install && npm run build

Copy dist/ directory to backend/public. Install modules via npm install (or use yarn if you prefer). Run the server via:

npm run start

Check out the gist here for a docker-compose file.

Contribution

Contributions are welcome especially for the frontend side. Because I'm not good at with frontend development, any UI/UX improvements are welcome! Feel free to create an issue or a pull request.

Known Bugs

There are some bugs with the vue-prism-editor and tribute. Because vue-prism-editor is just a dead simple code editor and tribute is not really designed for autocompletion, it is possible to face with UX issues. Here is some known bugs:

  • Selecting an offered prediction by Enter or Tab keys breaks the editor due to "keys conflict" between vue-prism-editor and tribute.
  • tribute doesn't show \ns and other speacial characters If Galois's predictions include \n or another space character.
  • tribute doesn't trigger when the space key is pressed.

Look contributions section if you say "hey I can fix these issues!" 🙌

Author

👤 Ibrahim Ethem DEMIRCI

Twitter: @iedmrc | Github: @iedmrc | Patreon: @iedmrc

Ibrahim's open-source projects are supported by his Patreon. If you found this project helpful, any monetary contributions to the Patreon are appreciated and will be put to good creative use.

License

It is licensed under MIT License as found in the LICENSE file.