build: frontend added + backend restapi format#32
Conversation
build: pulling incomplete front-end over to test front-end / backend development
build: pulling changes from backend to frontend for testing
Facing issues pertaining to how Docker DNS / `localhost` works.
Updated back-end to output array of speaker-utterance pairs instead. Updated documentation for clearer view.
`upload_audio` now handles the uploading of audio files to target directory for the /jobs endpoint.
New problem - FastAPI route cannot complete request successfully
Changed endpoints to follow the RestAPI format for good practice
There was a problem hiding this comment.
Summary of Changes
Hello @incizm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces the foundational structure for a React frontend application and significantly refactors the existing Python backend to adopt a REST API format using FastAPI. The changes enable basic audio file uploads and lay the groundwork for managing transcription jobs via new backend endpoints.
Highlights
- Backend API Refactor: The Python backend has been refactored into a FastAPI application, introducing a RESTful structure with dedicated endpoints for managing audio transcription jobs.
- New Frontend Application: A new
frontenddirectory has been added, containing the basic structure for a React application. This includes components for uploading audio files, although the frontend is noted as not yet fully functional. - Job Management Endpoints: New backend routes (
/jobs,/jobs/{uuid}/...) have been implemented to handle listing existing jobs, uploading new audio files for processing, deleting jobs, and retrieving job status and results (raw and formatted transcripts) using unique UUIDs. - Docker Configuration Updates: The Docker setup has been updated to accommodate both the new frontend and the refactored backend. This includes separate Dockerfiles and updates to
docker-compose.ymlfor building and running both services, managing volumes, and updating port mappings.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configureGemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces a frontend application and significantly refactors the backend to a REST API structure. Key changes include Docker updates, new API endpoints for job management, and initial frontend components for interaction. While these are positive steps, critical issues exist in the backend concerning transcript file type mismatches and potential errors in API logic. The frontend also has an issue with rendering transcription results. Additionally, the backend's processing device is now hardcoded to CPU, which could be a performance concern. These issues should be addressed to ensure functionality and stability.
Added frontend code (not yet functional)
Changed backend code to RestAPI format for good practice