<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Mohamed Rayen Bouzaabia</title>
    <description>The latest articles on Forem by Mohamed Rayen Bouzaabia (@rayenbouzaabia).</description>
    <link>https://forem.com/rayenbouzaabia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1406735%2F8e086f08-4903-4a2b-a873-b22e0dba6592.jpg</url>
      <title>Forem: Mohamed Rayen Bouzaabia</title>
      <link>https://forem.com/rayenbouzaabia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rayenbouzaabia"/>
    <language>en</language>
    <item>
      <title>“Why do we need to learn this?”</title>
      <dc:creator>Mohamed Rayen Bouzaabia</dc:creator>
      <pubDate>Sun, 14 Apr 2024 19:13:53 +0000</pubDate>
      <link>https://forem.com/rayenbouzaabia/why-do-we-need-to-learn-this-3llf</link>
      <guid>https://forem.com/rayenbouzaabia/why-do-we-need-to-learn-this-3llf</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/devteam/join-us-for-the-cloudflare-ai-challenge-3000-in-prizes-5f99"&gt;Cloudflare AI Challenge&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;LearnWhy&lt;/strong&gt; is a groundbreaking web application designed to answer the timeless question, &lt;strong&gt;"Why do we need to learn this?"&lt;/strong&gt;. As students grapple with complex scientific topics, With the power of &lt;strong&gt;Generative AI&lt;/strong&gt;, LearnWhy empowers them with real-world stories, generated from text input, that vividly illustrate the relevance and practical significance of each concept. Seamlessly integrating captivating images, LearnWhy transforms abstract ideas into tangible experiences, fostering curiosity, comprehension, and a profound appreciation for the wonders of science.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;You can find a demo of LearnWhy at &lt;a href="https://learnwhy.pages.dev/"&gt;this link&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Frontend (Vue.js 3)&lt;/strong&gt;&lt;br&gt;
The frontend of LearnWhy is meticulously crafted using &lt;strong&gt;Vue.js 3&lt;/strong&gt;, ensuring a seamless user experience and responsive design. Dive into the codebase on &lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/mohamedrayen/learnwhy"&gt;LearnWhy Frontend Repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend (Cloudflare Workers)&lt;/strong&gt;&lt;br&gt;
LearnWhy's backend infrastructure, powered by Cloudflare Workers, orchestrates the magic behind the scenes. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Story Generation&lt;/strong&gt;: The story generation functionality is implemented with precision in the &lt;a href="https://github.com/mohamedrayen/storiesGen-cloudflare-hackathon"&gt;Story Generation Cloudflare Workers Repository&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image Generation&lt;/strong&gt;: Delve into the code responsible for crafting captivating images in the &lt;a href="https://github.com/mohamedrayen/imgGen-cloudflare-hachathon"&gt;Image Generation Cloudflare Workers Repository&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Screenshot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bxrcma12rwhafss6ujy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6bxrcma12rwhafss6ujy.png" alt="Image description" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;In the process of building LearnWhy, I implemented the following workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Get User Text&lt;/strong&gt;: Users input their text, expressing their struggles with understanding complex scientific topics.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extract Incomprehensible Topic&lt;/strong&gt;: LearnWhy utilizes the &lt;strong&gt;mistral-7b-instruct-v0.2&lt;/strong&gt; llm model to extract the incomprehensible topic from the user's input.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generate Story&lt;/strong&gt;: Using the &lt;strong&gt;llama-2-7b-chat-fp16&lt;/strong&gt; llm model, LearnWhy generates a real-world story highlighting the necessity of understanding the identified concept in our lives.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generate Prompt&lt;/strong&gt;: From the generated story, LearnWhy creates a prompt illustrating the general scene, again using the &lt;strong&gt;mistral-7b-instruct-v0.2&lt;/strong&gt; llm model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generate Image&lt;/strong&gt;: LearnWhy generates an image illustrating the scene described in the prompt, utilizing the &lt;strong&gt;stable-diffusion-xl-lightning&lt;/strong&gt; model.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Throughout LearnWhy's development, I gained invaluable insights into implementing AI-driven solutions. Leveraging Cloudflare Workers and Pages was instrumental, enabling seamless integration of AI functionality into the backend and rapid deployment of the Vue.js frontend. Cloudflare's scalability and performance ensured a smooth user experience. Vue.js served as the foundation for dynamic interfaces, facilitating seamless integration of text input, story generation, and image creation. This synergy culminated in a comprehensive learning experience for users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiple Models and/or Triple Task Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;LearnWhy harnesses the power of multiple models per task, seamlessly integrating &lt;strong&gt;text classification&lt;/strong&gt;, &lt;strong&gt;text generation&lt;/strong&gt; and &lt;strong&gt;image generation&lt;/strong&gt;. qualifying for the additional prize categories.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Model Name&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Incomprehensible Topic Extraction&lt;/td&gt;
&lt;td&gt;mistral-7b-instruct-v0.2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Story Generation&lt;/td&gt;
&lt;td&gt;llama-2-7b-chat-fp16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt Generation&lt;/td&gt;
&lt;td&gt;mistral-7b-instruct-v0.2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Image Generation&lt;/td&gt;
&lt;td&gt;bytedance/stable-diffusion-xl-lightning&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  DEV usernames
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://dev.to/rayenbouzaabia"&gt;rayenbouzaabia&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cloudflarechallenge</category>
      <category>devchallenge</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
