Litoco AI: Link to Content - Cloudflare AI Challenge Submission
Tags: cloudflarechallenge, devchallenge, ai
Published: 2024-04-13 18:11:13

*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

This project uses Cloudflare Worker AI Models that includes multiple models, Pages, and an R2 service to speed up content creation. 

Users can generate ready-made human like social media content like Twitter threads, LinkedIn posts, and more, complete with AI-generated images. All they need to do is provide a link to an article, YouTube video, blog, or website containing relevant information.

The project features a simple, user-friendly Next.js web app deployed on Cloudflare Pages, with Workers handling the API. This setup ensures a fast and reliable experience for users looking to create engaging content without the usual hassle.

## Demo

🎉 Check out the live demo of Litoco AI: Junior Social Media Intern - [litoco-ai.pages.dev](https://litoco-ai.pages.dev/)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/10h00i2rr4rwf64iqg6h.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r58dkzco1z30tml7pwno.png)



## My Code

Open Source Repository containing Code:- [https://github.com/SRX9/Litoco-AI](github.com/SRX9/Litoco-AI)

## Journey

Process:- 
![Image description](https://media.ayecaso.com/Untitled-2024-04-13-2346-min.png)


**Multiple Models and/or Triple Task Types**
1. **@cf/facebook/bart-large-cnn** - For Summarization 
2. **@hf/thebloke/zephyr-7b-beta-awq** - For text content creation
3. **@cf/bytedance/stable-diffusion-xl-lightning** - For thumbnail Image creation

Task types:- 
1. Reading Content from URL
2. Summarizing huge chunk of text using Summarization Model
3. Generating proper content as per requirement from text LLM model
4. Generate Image thumbnail if required, using Image Models
5. Storing Generated Image in Cloudflare R2 Storage

Story:-

Main reason for me to join this challenge was to explore huge set of Cloudflare Worker AI models and other services like Pages, R2 and all, so decided to create a AI Service which would help in speeding up the process of content creation, as i personally like to read interesting knowledgeable blogs, YouTube videos and article and post summary and thread of it, but was too time taking so instead creating this tool to help speed up and streamline the process. 

The project utilizes several Cloudflare Worker AI models. The first model summarizes large chunks of text to reduce context length for the text-to-text model in the next step. The second model generates text content and image descriptions based on the provided URL content. The third model, an Image Generation Model, creates custom images based on the given content theme.

In the process, even though a small project, learnt a lot about Cloudflare Services during the development process and was quite impressed with the models, ease of integration, and other services like Pages for hosting full-stack Next.js apps and R2 for storage.

Looking ahead, the project plans to add more types of social media content beyond the current Twitter thread and LinkedIn long post generation. Additionally, there are plans to use Cloudflare D1 to store generated content, allowing users to easily refer back to their creations, and much more.