✅Write4All
In a world where diversity and inclusivity are essential, crafting content that resonates with everyone can be a challenge. With ✅Write4All I hope making the world more inclusive, one word and image at a time.
See it in action in:
- Demo on HuggingFace Spaces: ✅Write4All.
- Examples notebook: ✅Write4All Examples.
- YouTube video: ✅Write4All video.
- GitHub repo: ✅Write4All repo
Inspiration
Shortly before discovering this hackathon, I came across a Guide for Inclusive Language from the Barcelona City Hall, available in Catalan or Spanish. When I learned about this hackathon I connected the dots and I thought, "Text editors suggest orthographical & grammatical improvements for text, so why not go beyond and suggest ways to be more inclusive?" Thus, I decided to explore whether Google's Gemini could assist in creating more inclusive content for this Hackathon.
What it does
✅Write4All detects inclusivity issues in text and images, proposes fixes for these issues, and provides explanations for the proposed fixes. It serves as a pedagogical tool, helping users visualize inclusivity problems and raise awareness about them.
How we built it
✅Write4All was developed using Google AI's Gemini APIs. After initial testing with Google's AI interface, I could validate that it was possible to get some useful suggestions to improve texts. I then worked so that Gemini's output was structured so it could be easily parsed as a JSON. Then created the UI using Gradio.
To refine the prompt, I constructed a small ground truth dataset with sentences to be corrected, allowing me to measure improvements made to the prompt.
Challenges we ran into
- Prompt engineering: the model was detecting non-existent issues, generating useless fixes, and modifying the meaning of text. Tuning the prompt I managed to mitigate this issues.
- Safety settings adjustment: answers were blocked due to potential toxicity while avoiding repeating toxic text or explaining why it is toxic.
- Gemini free tier limitations: Despite superior performance of Gemini 1.5 Pro, limitations on free-tier requests forced defaulting to Gemini 1.0 Pro so users can run several experiments before quickly reaching requests limits.
- Multilingual support issues: Testing in languages other than English revealed occasional failure to provide grammatically correct corrections in Spanish and Catalan.
Accomplishments that I'm proud of
i'm proud of ✅Write4All's ability to suggest useful corrections, its transparency in explaining suggestions, and its overall performance, particularly with Gemini 1.5 Pro. Constructing a tool that promotes inclusivity is a significant achievement for me.
What I learned
Through this project, I gained familiarity with Gemini's API and Google's AI UI, as well as experience deploying apps on Huggingface spaces. Additionally, I got deeper understanding of various forms of language and image discrimination.
What's next for Write4All?
- Create a user friendly interface or an add-on for some text editor like Google Docs.
- Write4All could process audio or videos.
- Apply suggested changes to images.
- Refine prompt to provide detect issues better, propose better solutions and provide better arguments.
Log in or sign up for Devpost to join the conversation.