Skip to content

In this project, a model is made using gemini API where if a code is inputted, the output shows an overview of the code, vulnerabilities and improvement suggestions, language conversation.

Notifications You must be signed in to change notification settings

granthanchatterjee/Code-Analyzer-using-Gemini-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Code Analyzer using Gemini API

About:

I have made a tool that can analyze code and if needed, translate to these languages:

  1. Python
  2. JavaScript
  3. Java
  4. C++
  5. C#
  6. Ruby
  7. Go

To make this:

  • Gemini 1.5 Flash is used for the generation of code report, vulnerabilities and potential improvements, translated language.
  • Tkinter is used for interface
  • Regular expression (re) is used for finding patterns and formatting text for easier readibility.

Working:

The below image is the starting interface of the tool: Starting interface

We enter our code(no need of mentioning the language of the code, the tool detects it by its own) and select the language we want to translate in (optional). If needed, click Reset to erase everything (In this case, it's python language and we translate it to C++): Select language

After we click Analyze, it will analyze and generate results after a while.

When done analyzing, we can select any tab for the result:

Analysis Result

Here, the model explains the working of the code the user has uploaded: Analysis Result

Vulnerabilities and Suggestions

Here, the model generates a report on vulnerabilities on the code and also gives some suggestions to tackle them: Vulnerabilities   Suggestions

Translated Code

Here, the model translates our code to the language we select (It's empty if we don't select any language): Translated Code

Note:

  • It only works on codes, nothing else
  • In 'Translated Code' section, only translation is given, no explaination
  • You need to have your own Gemini API

About

In this project, a model is made using gemini API where if a code is inputted, the output shows an overview of the code, vulnerabilities and improvement suggestions, language conversation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages