Introducing DEV AI: Your Tech Blogging Sidekick
Tags: cloudflarechallenge, devchallenge, ai, writing
Published: 2024-04-13 17:01:31

*This is a submission for the [Cloudflare AI Challenge](https://dev.to/devteam/join-us-for-the-cloudflare-ai-challenge-3000-in-prizes-5f99).*

## What I Built

Presenting **DEV AI** ✨, an AI assistant for the DEV platform. The app caters to two categories of users: *Readers* and *Creators*.

For readers 👀: 
1. It can summarize an article for you.
2. It can translate the summarization into your preferred language.
3. It can do a sentiment analysis on the article.

For creators ✍️:
1. It can generate a cover image for you.
2. It can create a structured plan for your next article.

## Demo

{% cta https://dev-to-ai.pages.dev %} :link: DEV AI {% endcta %}

Reader mode
![Reader mode](https://dev-to-ai.pages.dev/reader-mode.jpeg)

Creator mode
![Creator mode](https://dev-to-ai.pages.dev/creator-mode.jpeg)

## My Code

{% embed https://github.com/thesanjeevsharma/dev-to-ai %} 

## Journey

<!-- Tell us about your process, the task types and models you used, what you learned, anything you are particularly proud of, what you hope to do next, etc. -->

Initially, I was planning to build a summarizer for YouTube videos but YT already does that. Also, the same idea has been implemented by quite a few devs. It wasn't unique and it would have been a throwaway project for me.

Then while browsing DEV, I got this idea of summarizing articles instead. I know it's been built too, but not specifically for DEV. I added translation and sentiment analysis as well to take it a step further.

Later on, I extended the app to have a *Creator mode*. I've used ChatGPT countless times whenever I've hit the writers block, which is why I wanted to build something to help writers like me. I also spend a lot of time trying to find the right cover image for my article, hence decided to add an Image generation feature as well.

This is my first project with an AI integration. Now, I've got some idea about how these models work from an API perspective and I can explore further in this area. It was a fun challenge and filled with lots of learning.

*Future plans:* I plan to keep the app running and make gradual updates to it(Hopefully, these AI models will keep getting better). It's actually a resume-worthy project. ✨  

*Techstack:* NextJS, TailwindCSS and Cloudflare Pages.

Models used:
1. [@cf/facebook/bart-large-cnn](https://developers.cloudflare.com/workers-ai/models/bart-large-cnn/) for summarizing. It's in beta right now, therefore results aren't that great. I tried switching to other text generation models but the input text is limited on those. I guess I'll have to stick with this one for now.
2. [@cf/meta/m2m100-1.2b](https://developers.cloudflare.com/workers-ai/models/m2m100-1.2b/) for translation.
3. [@cf/huggingface/distilbert-sst-2-int8](https://developers.cloudflare.com/workers-ai/models/distilbert-sst-2-int8/) for sentiment analysis.
4. [@cf/stabilityai/stable-diffusion-xl-base-1.0](https://developers.cloudflare.com/workers-ai/models/stable-diffusion-xl-base-1.0/) for generating the cover image based on description provided by the user.
5. [@cf/meta/llama-2-7b-chat-fp16](https://developers.cloudflare.com/workers-ai/models/llama-2-7b-chat-fp16/) for creating a writing plan for article based on the description provided.


**Multiple Models and/or Triple Task Types**

Yes, I've used 5 models as stated above.