<?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>DEV Community: Jad Tounsi</title>
    <description>The latest articles on DEV Community by Jad Tounsi (@jadouse5).</description>
    <link>https://dev.to/jadouse5</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%2F1925770%2F0e9ee3bd-2ca7-4240-ae35-da796764afc7.png</url>
      <title>DEV Community: Jad Tounsi</title>
      <link>https://dev.to/jadouse5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jadouse5"/>
    <language>en</language>
    <item>
      <title>📄 OCR Reader, 🔍 Analyzer, and 💬 Chat Assistant using 🔎 Zerox, 🧠 GPT-4o, powered by 🚀 AI/ML API</title>
      <dc:creator>Jad Tounsi</dc:creator>
      <pubDate>Tue, 22 Oct 2024 00:39:51 +0000</pubDate>
      <link>https://dev.to/jadouse5/ocr-reader-analyzer-and-chat-assistant-using-zerox-gpt-4o-powered-by-aiml-api-4g41</link>
      <guid>https://dev.to/jadouse5/ocr-reader-analyzer-and-chat-assistant-using-zerox-gpt-4o-powered-by-aiml-api-4g41</guid>
      <description>&lt;p&gt;&lt;strong&gt;What I Built&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I built an &lt;strong&gt;OCR Document Reader&lt;/strong&gt; that allows users to upload and extract text from various document types such as PDFs, Word, and documents. The app utilizes the &lt;a href="https://github.com/getomni-ai/zerox" rel="noopener noreferrer"&gt;&lt;strong&gt;Zerox&lt;/strong&gt;&lt;/a&gt; library for Optical Character Recognition (OCR) and integrates the &lt;strong&gt;&lt;a href="https://aimlapi.com/?via=jad" rel="noopener noreferrer"&gt;AI/ML API&lt;/a&gt;'s GPT-4o&lt;/strong&gt; model for advanced text analysis. With features like &lt;strong&gt;support for multiple document formats&lt;/strong&gt;, &lt;strong&gt;text analysis&lt;/strong&gt;, and an interactive interface built with &lt;strong&gt;Gradio 5.0&lt;/strong&gt;, this app simplifies the process of extracting and analyzing text from complex documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Processing Time&lt;/strong&gt;: Enabling the &lt;code&gt;maintain_format&lt;/code&gt; option can slow down processing due to sequential requests needed to preserve formatting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Constraints&lt;/strong&gt;: The app's capabilities depend on the limitations of the AI/ML API plan, such as request quotas and document size restrictions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System Dependencies&lt;/strong&gt;: Requires installation of system packages like &lt;code&gt;poppler-utils&lt;/code&gt;, which may not be straightforward on all platforms.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Here are some key features of the app:&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Upload Documents&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Users can upload PDFs, Word documents, or images for OCR processing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extracted Text Display&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
The extracted text is displayed within the app, with options to copy or download it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Maintain Formatting&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Optionally preserve the original document's formatting in the extracted text.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Find the source code for the project on &lt;a href="https://github.com/jadouse5/ocr-gradio-aimlapi" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt;: Core programming language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gradio 5.0&lt;/strong&gt;: For building the user-friendly interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zerox&lt;/strong&gt;: Library used for OCR processing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI/ML API&lt;/strong&gt;: Provides the GPT-4o model for text analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LiteLLM&lt;/strong&gt;: Used under the hood for model interactions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  More Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zerox Library&lt;/strong&gt;: Transforms uploaded documents into images and performs OCR to extract text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI/ML API's GPT-4o&lt;/strong&gt;: Analyzes the extracted text, enabling advanced features like summarization or content analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gradio Interface&lt;/strong&gt;: Offers an intuitive web-based UI for users to interact with the app seamlessly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Future Improvements
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Batch Processing&lt;/strong&gt;: Enable users to upload and process multiple documents at once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Formatting Preservation&lt;/strong&gt;: Improve the ability to retain complex layouts, tables, and graphics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Accounts&lt;/strong&gt;: Implement authentication to allow users to save and manage their processed documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Integration&lt;/strong&gt;: Add options to upload documents from and save results to cloud storage services.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Running the Repository
&lt;/h2&gt;

&lt;p&gt;To run this project locally, follow these steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Clone the repository&lt;/span&gt;
git clone https://github.com/jadouse5/ocr-gradio-aimlapi.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ocr-document-reader

&lt;span class="c"&gt;# 2. Install Python dependencies&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="c"&gt;# 3. Install system dependencies&lt;/span&gt;
&lt;span class="c"&gt;# On Ubuntu/Linux&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; poppler-utils

&lt;span class="c"&gt;# On macOS (using Homebrew)&lt;/span&gt;
brew &lt;span class="nb"&gt;install &lt;/span&gt;poppler

&lt;span class="c"&gt;# 4. Set up environment variables&lt;/span&gt;
&lt;span class="c"&gt;# Create a .env file in the root directory and add:&lt;/span&gt;
&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_api_key
&lt;span class="nv"&gt;OPENAI_API_BASE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;https://api.aimlapi.com/v1  &lt;span class="c"&gt;# Adjust if necessary&lt;/span&gt;

&lt;span class="c"&gt;# 5. Run the application&lt;/span&gt;
python ocr_app.py

&lt;span class="c"&gt;# 6. Open your browser and navigate to&lt;/span&gt;
http://localhost:7860
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Replace &lt;code&gt;your_api_key&lt;/code&gt; with your actual API key for the AI/ML API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hashtags
&lt;/h2&gt;

&lt;h1&gt;
  
  
  OCR #AI #Gradio #Python #GPT4o #Zerox #TextAnalysis #MachineLearning
&lt;/h1&gt;




&lt;p&gt;Feel free to customize this README with your own links, images, and additional details to better suit your project. This template follows the structure of the example you provided and highlights the key aspects of your OCR Document Reader application.&lt;/p&gt;

</description>
      <category>ocr</category>
      <category>aimlapi</category>
      <category>openai</category>
      <category>gradio</category>
    </item>
    <item>
      <title>Multi-Agent System for 🚀 ANY AI/ML Model: 🌐 Web Scraping &amp; 📝 Content Analysis Powered by the 🔗 AI/ML API</title>
      <dc:creator>Jad Tounsi</dc:creator>
      <pubDate>Sun, 20 Oct 2024 21:13:23 +0000</pubDate>
      <link>https://dev.to/jadouse5/multi-agent-system-for-any-aiml-model-web-scraping-content-analysis-powered-by-the-aiml-api-5ek8</link>
      <guid>https://dev.to/jadouse5/multi-agent-system-for-any-aiml-model-web-scraping-content-analysis-powered-by-the-aiml-api-5ek8</guid>
      <description>&lt;h1&gt;
  
  
  🐝 Multi-Agent System for 🚀 ANY AI/ML Model: 🌐 Web Scraping &amp;amp; 📝 Content Analysis Powered by the 🔗 AI/ML API
&lt;/h1&gt;

&lt;p&gt;This project demonstrates a multi-agent system that automates web scraping, content analysis, and summary generation using the AI/ML API. It is built using &lt;strong&gt;Streamlit&lt;/strong&gt; for the user interface, &lt;strong&gt;BeautifulSoup&lt;/strong&gt; for web scraping, and the &lt;strong&gt;AI/ML API&lt;/strong&gt; for text generation and analysis.&lt;/p&gt;

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

&lt;p&gt;The app enables you to dynamically change the model and modify any agent in the workflow to suit different use cases. Simply provide your AI/ML API key, and you can use any model supported by the AI/ML API.&lt;/p&gt;

&lt;h1&gt;
  
  
  Get your AI/ML API
&lt;/h1&gt;

&lt;p&gt;You can obtain your AI/ML API key by visiting the following link:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aimlapi.com/?via=jad" rel="noopener noreferrer"&gt;AI/ML API&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web Scraping&lt;/strong&gt;: Scrapes the content of a given website URL using BeautifulSoup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Analysis&lt;/strong&gt;: Analyzes the scraped content to extract key insights using the AI/ML API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Summary Generation&lt;/strong&gt;: Generates a detailed summary of the analyzed content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamlit UI&lt;/strong&gt;: Interactive user interface that allows users to enter the website URL and view the generated report.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible AI Models&lt;/strong&gt;: Supports any model from the AI/ML API. You can change the model used for content analysis and summary generation dynamically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Customization&lt;/strong&gt;: Modify the behavior of each agent (scraping, analyzing, summarizing) by changing the instructions, functions, or models.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;AI/ML API Key Input&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The app dynamically sets the API key using an input field. The key is stored in the environment and used for making API calls to the AI/ML API.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Web Scraping&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The app scrapes the provided website URL using BeautifulSoup and extracts the text content from the website's HTML.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Content Analysis&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The scraped content is analyzed by the AI/ML API using a chat completion model to extract key insights.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Summary Generation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A detailed summary is generated using the AI/ML API based on the content analysis.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download Report&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The final summary can be downloaded as a text file directly from the Streamlit interface.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.10+&lt;/li&gt;
&lt;li&gt;Streamlit for the interactive web interface.&lt;/li&gt;
&lt;li&gt;BeautifulSoup for web scraping.&lt;/li&gt;
&lt;li&gt;Requests for handling HTTP requests.&lt;/li&gt;
&lt;li&gt;AI/ML API Key for making API calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Steps
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clone the Repository:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/jadouse5/aimlapi-webscraper-agents.git
&lt;span class="nb"&gt;cd &lt;/span&gt;aimlapi-webscraper-agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set Up a Virtual Environment:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv myenv
&lt;span class="nb"&gt;source &lt;/span&gt;myenv/bin/activate  &lt;span class="c"&gt;# On macOS/Linux&lt;/span&gt;
myenv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate  &lt;span class="c"&gt;# On Windows&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install Required Packages:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Set Up API Keys&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Create a &lt;code&gt;.env&lt;/code&gt; file in the project root and add your AI/ML API key:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"AIMLAPI_API_KEY=your-api-key-here"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .env
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run the Application:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;streamlit run app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open the Web Interface&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Once the application is running, it will open in your default browser. If not, go to &lt;a href="http://localhost:8501" rel="noopener noreferrer"&gt;http://localhost:8501&lt;/a&gt; manually.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set Your AI/ML API Key&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Input your AI/ML API Key in the text box to authenticate and allow the app to access the API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Input Website URL&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Enter the URL of the website you want to scrape in the provided input box.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Run Workflow&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Click the "Run Workflow" button to start scraping the website, analyzing its content, and generating a summary report.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modify Models or Agents&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
You can modify the AI models used in each agent by adjusting the code, allowing you to experiment with different models for scraping, analysis, or summarizing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Download Report&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Once the workflow completes, you can download the generated report by clicking the "Download Report" button.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Key Components
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web Scraping&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Scrapes the text content from the provided website URL using BeautifulSoup.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Content Analysis&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
The scraped content is analyzed using the AI/ML API, extracting key insights.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Summary Generation&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
A detailed summary is generated based on the analysis using another AI model call.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Code Example
&lt;/h2&gt;

&lt;p&gt;Here’s an example of how the system orchestrates the workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;orchestrate_workflow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Step 1: Scrape the website
&lt;/span&gt;    &lt;span class="n"&gt;scraped_content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;scrape_website&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 2: Analyze the scraped content
&lt;/span&gt;    &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You are an agent that analyzes content and extracts key insights.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Analyze the following content: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;scraped_content&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o-mini-2024-07-18&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;analysis_summary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 3: Write the summary based on the analysis
&lt;/span&gt;    &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You are an agent that writes summaries of research.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Write a summary based on this analysis: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;analysis_summary&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o-mini-2024-07-18&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;final_summary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;final_summary&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Customization
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Using Different Models
&lt;/h3&gt;

&lt;p&gt;You can change the models used in the agents by modifying the &lt;code&gt;model&lt;/code&gt; parameter in the &lt;code&gt;orchestrate_workflow&lt;/code&gt; function. The AI/ML API supports multiple models, allowing you to experiment with different models for each task:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scraping Agent&lt;/strong&gt;: Modify the scraping agent to handle different types of content or preprocess the data differently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analysis Agent&lt;/strong&gt;: Choose a model that best suits your analysis needs, such as summarization or topic extraction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Summary Agent&lt;/strong&gt;: Use a model that generates detailed, concise, or creative summaries depending on your goal.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Modify Agents
&lt;/h3&gt;

&lt;p&gt;Each agent is highly customizable. Adjust the instructions or add new functions for more advanced workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Future Improvements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Advanced Scraping&lt;/strong&gt;: Improve the scraper to handle dynamic content (e.g., JavaScript-heavy sites).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;More Detailed Analysis&lt;/strong&gt;: Expand the analysis to include sentiment analysis or categorization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multilingual Support&lt;/strong&gt;: Extend the app to support scraping, analyzing, and summarizing content in multiple languages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CAPTCHA Handling&lt;/strong&gt;: Add support for bypassing or manually entering CAPTCHAs when scraping protected websites.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;This project is licensed under the MIT License. See the &lt;a href="https://dev.toLICENSE"&gt;LICENSE&lt;/a&gt; file for details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contact
&lt;/h2&gt;

&lt;p&gt;Developed by: &lt;strong&gt;Jad Tounsi El Azzoiani&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/jadouse5" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;&lt;br&gt;&lt;br&gt;
LinkedIn: &lt;a href="https://linkedin.com/in/jad-tounsi-el-azzoiani" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>aimlapi</category>
      <category>openai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🦙💬 Building a Next.js Chatbot with NVIDIA Llama 3.1 Nemotron-70B Integration</title>
      <dc:creator>Jad Tounsi</dc:creator>
      <pubDate>Thu, 17 Oct 2024 01:50:06 +0000</pubDate>
      <link>https://dev.to/jadouse5/building-a-nextjs-chatbot-with-nvidia-llama-31-nemotron-70b-integration-9h2</link>
      <guid>https://dev.to/jadouse5/building-a-nextjs-chatbot-with-nvidia-llama-31-nemotron-70b-integration-9h2</guid>
      <description>&lt;p&gt;This project implements an AI chatbot using &lt;strong&gt;Next.js&lt;/strong&gt;, &lt;strong&gt;React&lt;/strong&gt;, and integrates with the &lt;strong&gt;NVIDIA Llama 3.1 Nemotron-70B&lt;/strong&gt; model for generating AI-powered responses. The frontend is built using Tailwind CSS, and the chatbot includes a real-time chat interface and supports customization for different applications.&lt;/p&gt;




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

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;p&gt;🦙💬 Llama 3.1 Nemotron 70B Chatbot&lt;br&gt;
🧠 AI-powered conversational interface&lt;br&gt;
🌓 Dark/light mode toggle&lt;br&gt;
⚛️ Built with React and Next.js&lt;br&gt;
🎨 Styled with Tailwind CSS&lt;br&gt;
🔄 Real-time chat interactions&lt;br&gt;
📱 Responsive design&lt;br&gt;
🚀 Fast and efficient&lt;br&gt;
🔒 Secure API integration&lt;/p&gt;




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

&lt;p&gt;&lt;a href="https://nemotron.vercel.app/" rel="noopener noreferrer"&gt;DEMO&lt;/a&gt;&lt;/p&gt;

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




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clone the repository&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone https://github.com/jadouse5/llama3.1-nemotron-chatbot.git
   &lt;span class="nb"&gt;cd &lt;/span&gt;llama3.1-nemotron-chatbot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install dependencies&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set up environment variables&lt;/strong&gt;:
Create a &lt;code&gt;.env.local&lt;/code&gt; file in the root directory and add your NVIDIA API key:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;   &lt;span class="py"&gt;NVIDIA_API_KEY&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;your_nvidia_api_key_here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the development server&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Open &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; in your browser to interact with the chatbot.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Type your message in the input field at the bottom of the chat interface.&lt;/li&gt;
&lt;li&gt;Press Enter or click the &lt;strong&gt;Send&lt;/strong&gt; button to submit your message.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Customization
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Modify the gradient background by editing the file &lt;code&gt;components/ui/background-gradient.tsx&lt;/code&gt; to adjust the colors and animation.&lt;/li&gt;
&lt;li&gt;Adjust the chatbot interface styling in &lt;code&gt;components/ChatbotComponent.tsx&lt;/code&gt; to fit your design preferences.&lt;/li&gt;
&lt;li&gt;You can also tweak the behavior of the AI model by adjusting the parameters (such as &lt;code&gt;temperature&lt;/code&gt; and &lt;code&gt;max_tokens&lt;/code&gt;) in the API route file.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;Contributions are welcome! If you'd like to improve the project or add new features, please feel free to submit a Pull Request.&lt;/p&gt;




&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;This project is licensed under the MIT License - see the &lt;a href="https://dev.toLICENSE"&gt;LICENSE&lt;/a&gt; file for details.&lt;/p&gt;




&lt;h2&gt;
  
  
  Connect with Me
&lt;/h2&gt;

&lt;p&gt;Feel free to reach out for discussions, collaborations, or questions about AI development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/jadouse5" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn&lt;/strong&gt;: &lt;a href="https://www.linkedin.com/in/jad-tounsi-el-azzoiani-87499a21a/" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>nemotron</category>
      <category>nvidia</category>
      <category>nextjs</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Building an 🐝 OpenAI SWARM 🔍 Web Scraping and Content Analysis Streamlit Web App with 👥 Multi-Agent Systems</title>
      <dc:creator>Jad Tounsi</dc:creator>
      <pubDate>Mon, 14 Oct 2024 01:05:00 +0000</pubDate>
      <link>https://dev.to/jadouse5/building-an-openai-swarm-web-scraping-and-content-analysis-streamlit-web-app-with-multi-agent-systems-bl0</link>
      <guid>https://dev.to/jadouse5/building-an-openai-swarm-web-scraping-and-content-analysis-streamlit-web-app-with-multi-agent-systems-bl0</guid>
      <description>&lt;h1&gt;
  
  
  🔍 Building an OpenAI SWARM Web Scraping and Content Analysis Application with Multi-Agent Systems
&lt;/h1&gt;

&lt;p&gt;Web scraping and content analysis are critical in today's data-driven world. In this article, we explore how to implement a multi-agent system that automates these tasks using OpenAI's &lt;strong&gt;Swarm framework&lt;/strong&gt;. This project demonstrates how a system can scrape websites, process the content, and generate summaries automatically. The system is ideal for applications like content aggregation, market analysis, and research automation.&lt;/p&gt;

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




&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;About the Author&lt;/li&gt;
&lt;li&gt;Introduction to the Project&lt;/li&gt;
&lt;li&gt;What You'll Need&lt;/li&gt;
&lt;li&gt;
Setting Up the Project

&lt;ul&gt;
&lt;li&gt;Step 1: Install Python&lt;/li&gt;
&lt;li&gt;Step 2: Create a Virtual Environment&lt;/li&gt;
&lt;li&gt;Step 3: Install Jupyter (Optional)&lt;/li&gt;
&lt;li&gt;Step 4: Install Required Packages&lt;/li&gt;
&lt;li&gt;Step 5: Set Up the OpenAI API Key&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Running the Web App&lt;/li&gt;
&lt;li&gt;Credits&lt;/li&gt;
&lt;li&gt;Wrapping Up&lt;/li&gt;
&lt;li&gt;License&lt;/li&gt;
&lt;li&gt;Connect with Me&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  About the Author
&lt;/h2&gt;

&lt;p&gt;Hi there! I'm &lt;strong&gt;Jad Tounsi El Azzoiani&lt;/strong&gt;, a passionate machine learning and AI enthusiast who loves exploring efficient computing techniques, AI-driven automation, and web scraping. My goal is to stay on the cutting edge of AI technology and contribute to the open-source community by sharing my knowledge and solutions with fellow developers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/jadouse5" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn&lt;/strong&gt;: &lt;a href="https://www.linkedin.com/in/jad-tounsi-el-azzoiani-87499a21a/" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Introduction to the Project
&lt;/h2&gt;

&lt;p&gt;In this project, I explore how &lt;strong&gt;OpenAI's Swarm framework&lt;/strong&gt; can be used to build a multi-agent system that scrapes and analyzes content from websites. The system is designed to automatically retrieve data, analyze it, and provide concise summaries—perfect for anyone needing real-time content extraction and analysis.&lt;/p&gt;

&lt;p&gt;Some potential use cases include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Content Aggregation&lt;/strong&gt;: Automatically gather and summarize content from multiple sources.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Market Research&lt;/strong&gt;: Analyze data from multiple websites for industry trends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Research Automation&lt;/strong&gt;: Automatically collect and process research data for easy access and analysis.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What You'll Need
&lt;/h2&gt;

&lt;p&gt;Before you get started with this project, ensure that the following tools and libraries are installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.10+&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamlit&lt;/strong&gt;: A Python library for building web apps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI API Key&lt;/strong&gt;: Required for the Swarm framework.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BeautifulSoup&lt;/strong&gt;: A popular Python library for web scraping.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Requests&lt;/strong&gt;: For handling HTTP requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dotenv&lt;/strong&gt;: For managing environment variables.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tools form the backbone of this project and will help you build and run the multi-agent web scraping and content analysis system.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setting Up the Project
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Install Python
&lt;/h3&gt;

&lt;p&gt;Make sure you have &lt;strong&gt;Python 3.10+&lt;/strong&gt; installed. You can download the latest version from the official &lt;a href="https://www.python.org/downloads/" rel="noopener noreferrer"&gt;Python website&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Create a Virtual Environment
&lt;/h3&gt;

&lt;p&gt;It's always a good practice to isolate your project dependencies in a virtual environment. Here’s how to do that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open a terminal and navigate to your project directory.&lt;/li&gt;
&lt;li&gt;Create a virtual environment called &lt;code&gt;myenv&lt;/code&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   python &lt;span class="nt"&gt;-m&lt;/span&gt; venv myenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Activate the virtual environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On &lt;strong&gt;macOS/Linux&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;source &lt;/span&gt;myenv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;On &lt;strong&gt;Windows&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; myenv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: Install Jupyter (Optional)
&lt;/h3&gt;

&lt;p&gt;If you plan to develop or run the project using Jupyter notebooks, install JupyterLab inside the virtual environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;jupyterlab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Install Required Packages
&lt;/h3&gt;

&lt;p&gt;Once your virtual environment is activated, install the necessary Python packages for this project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;streamlit beautifulsoup4 requests python-dotenv
pip &lt;span class="nb"&gt;install &lt;/span&gt;git+https://github.com/openai/swarm.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Set Up the OpenAI API Key
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;In the project directory, create a &lt;code&gt;.env&lt;/code&gt; file to store your environment variables.&lt;/li&gt;
&lt;li&gt;Add the following line to the &lt;code&gt;.env&lt;/code&gt; file, replacing &lt;code&gt;your-api-key-here&lt;/code&gt; with your actual OpenAI API key:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="py"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;your-api-key-here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Running the Web App
&lt;/h2&gt;

&lt;p&gt;Now that everything is set up, follow these steps to run the web app:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Activate the virtual environment&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;On &lt;strong&gt;macOS/Linux&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;source &lt;/span&gt;myenv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On &lt;strong&gt;Windows&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; myenv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start the Streamlit app&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   streamlit run app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open the app in your browser&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once the app starts, Streamlit will provide a local URL (usually &lt;code&gt;http://localhost:8501&lt;/code&gt;). Open this URL in your browser.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the workflow&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Enter the URL of the website you want to scrape.&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Run Workflow&lt;/strong&gt; button to start the scraping and content analysis process.&lt;/li&gt;
&lt;li&gt;View the summary generated by the system directly in the browser.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;p&gt;This project leverages the &lt;strong&gt;Swarm framework&lt;/strong&gt; from OpenAI, which allows for efficient multi-agent orchestration. You can explore the Swarm repository on GitHub to learn more about how it works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Swarm GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/openai/swarm" rel="noopener noreferrer"&gt;OpenAI Swarm&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;The OpenAI Swarm Web Scraping project demonstrates the incredible power of multi-agent systems in automating web scraping and content analysis tasks. By combining multiple agents with the flexibility of the Swarm framework, this project can extract valuable insights from websites with ease. It’s a great example of how AI-driven systems can reduce manual effort in collecting and analyzing data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Connect with Me
&lt;/h2&gt;

&lt;p&gt;I’m always open to discussions, collaborations, or just a chat about AI and machine learning. Feel free to reach out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/jadouse5" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn&lt;/strong&gt;: &lt;a href="https://www.linkedin.com/in/jad-tounsi-el-azzoiani-87499a21a/" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>openai</category>
      <category>swarm</category>
      <category>streamlit</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Binarized Neural Network (BNN) on MNIST Dataset</title>
      <dc:creator>Jad Tounsi</dc:creator>
      <pubDate>Sun, 13 Oct 2024 23:40:17 +0000</pubDate>
      <link>https://dev.to/jadouse5/binarized-neural-network-bnn-on-mnist-dataset-efb</link>
      <guid>https://dev.to/jadouse5/binarized-neural-network-bnn-on-mnist-dataset-efb</guid>
      <description>&lt;h1&gt;
  
  
  Binarized Neural Network (BNN) on MNIST Dataset
&lt;/h1&gt;

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

&lt;h2&gt;
  
  
  Author
&lt;/h2&gt;

&lt;p&gt;I am a passionate machine learning and artificial intelligence enthusiast, with a focus on efficient computing and neural network optimization. I aim to explore SoTA AI technologies and contribute to the open-source community by sharing knowledge and innovative solutions.&lt;/p&gt;

&lt;p&gt;You can follow my work on GitHub: &lt;a href="https://github.com/jadouse5" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Connect with me on LinkedIn: &lt;a href="https://www.linkedin.com/in/jad-tounsi-el-azzoiani-87499a21a/" rel="noopener noreferrer"&gt;Jad Tounsi El Azzoiani&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This project demonstrates the implementation and performance of a &lt;strong&gt;Binarized Neural Network (BNN)&lt;/strong&gt; on the popular &lt;strong&gt;MNIST dataset&lt;/strong&gt;, which contains a collection of handwritten digits. BNNs use binary weights and, in some cases, binary activations, offering computational efficiency and suitability for &lt;strong&gt;resource-constrained environments&lt;/strong&gt; such as embedded systems and edge devices.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before running the project, ensure you have the following installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python 3.x&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jupyter Notebook&lt;/strong&gt; or &lt;strong&gt;JupyterLab&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TensorFlow&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Numpy&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Matplotlib&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Larq&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These libraries will be essential for building and training the BNN model.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;To set up the environment for running this project, follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install &lt;strong&gt;Python 3.x&lt;/strong&gt; from the official &lt;a href="https://www.python.org/downloads/" rel="noopener noreferrer"&gt;Python website&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Jupyter&lt;/strong&gt; using pip:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   pip &lt;span class="nb"&gt;install &lt;/span&gt;jupyterlab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install the required libraries:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   pip &lt;span class="nb"&gt;install &lt;/span&gt;tensorflow numpy matplotlib larq
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Running the Notebook
&lt;/h2&gt;

&lt;p&gt;Once you have set up the environment, follow these steps to run the project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open a terminal or command prompt and navigate to the directory containing the &lt;code&gt;.ipynb&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Run the following command to launch Jupyter Notebook:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   jupyter notebook
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;From the Jupyter interface, open the &lt;code&gt;binarized-neural-network-mnist.ipynb&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Follow the instructions in the notebook to train the BNN on the MNIST dataset.&lt;/li&gt;
&lt;/ol&gt;

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

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




&lt;h2&gt;
  
  
  Notebook Contents
&lt;/h2&gt;

&lt;p&gt;The notebook is organized into the following sections:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Introduction to BNNs&lt;/strong&gt;: A brief overview of Binarized Neural Networks and their advantages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loading the MNIST Dataset&lt;/strong&gt;: Instructions on loading and preprocessing the MNIST dataset for training.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Building the BNN Model&lt;/strong&gt;: Steps to define and compile the BNN using TensorFlow and Larq.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training the Model&lt;/strong&gt;: Training the BNN on the MNIST dataset and visualizing the process.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluation and Results&lt;/strong&gt;: Evaluating the model's performance and observing the accuracy and efficiency of the BNN.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conclusion&lt;/strong&gt;: A summary of the project's findings and potential areas for future work.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Expected Outcomes
&lt;/h2&gt;

&lt;p&gt;After running the notebook, you should:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the core concepts behind Binarized Neural Networks.&lt;/li&gt;
&lt;li&gt;See how BNNs can be applied to image recognition tasks like digit classification on the MNIST dataset.&lt;/li&gt;
&lt;li&gt;Explore the benefits of using binary weights and activations for efficient model execution.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Credits
&lt;/h2&gt;

&lt;p&gt;This project leverages the &lt;strong&gt;Larq&lt;/strong&gt; library, an open-source deep learning library for training neural networks with low-precision weights and activations, such as Binarized Neural Networks. Learn more about &lt;strong&gt;Larq&lt;/strong&gt; by visiting their &lt;a href="https://larq.dev/" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; or &lt;a href="https://github.com/larq/larq" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Binarized Neural Network&lt;/strong&gt; project demonstrates how BNNs can offer significant computational efficiency for machine learning tasks. By working with the MNIST dataset, we showcase the practical application of BNNs in a real-world scenario. The project also serves as a foundation for further exploration into low-precision neural networks and their potential for deployment in resource-constrained environments.&lt;/p&gt;

&lt;p&gt;This work highlights the importance of optimizing neural networks for faster and more efficient inference while maintaining accuracy, especially in scenarios where resources are limited, such as IoT devices and mobile platforms.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>neuralnetwork</category>
      <category>tensorflow</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>🦙 📹 PinataShot: Multimodal LLaMA 3.2 Screenshot Categorization on Pinata IPFS</title>
      <dc:creator>Jad Tounsi</dc:creator>
      <pubDate>Sun, 13 Oct 2024 00:03:25 +0000</pubDate>
      <link>https://dev.to/jadouse5/pinatashot-multimodal-llama-32-screenshot-categorization-on-pinata-ipfs-2ip2</link>
      <guid>https://dev.to/jadouse5/pinatashot-multimodal-llama-32-screenshot-categorization-on-pinata-ipfs-2ip2</guid>
      <description>&lt;h1&gt;
  
  
  PinataShot
&lt;/h1&gt;

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

&lt;p&gt;&lt;strong&gt;What I Built&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I built a &lt;strong&gt;SaaS Screenshot Organizer&lt;/strong&gt; that helps users upload, categorize, and search through their screenshots with ease. The app leverages &lt;strong&gt;Pinata’s Files API&lt;/strong&gt; for decentralized storage of images and integrates &lt;strong&gt;GROQ API's LLaMA 3.2 11B&lt;/strong&gt; for AI-powered analysis of screenshots. With features like &lt;strong&gt;OCR (optical character recognition)&lt;/strong&gt; for text extraction, automatic categorization, and a searchable screenshot gallery, this app streamlines organizing large collections of images and screenshots. It is deployed using &lt;strong&gt;Next.js&lt;/strong&gt; on Vercel to ensure scalability and speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;p&gt;One limitation in this version of the app is the restriction of processing &lt;strong&gt;one image at a time&lt;/strong&gt; when using the &lt;strong&gt;GROQ API&lt;/strong&gt;. This limitation stems from the current API constraints of GROQ's LLaMA 3.2 11B model, which can handle a single image per request for analysis. While this allows precise categorization and naming for each screenshot, it does limit bulk processing capabilities. &lt;/p&gt;

&lt;p&gt;However, &lt;strong&gt;Pinata&lt;/strong&gt; shines in this setup, as it seamlessly handles the decentralized storage of multiple images. Thanks to Pinata's robust and reliable &lt;strong&gt;IPFS-backed storage&lt;/strong&gt;, users can upload several screenshots at once, which are securely stored and easily retrievable, even when waiting for their turn in the AI analysis queue.&lt;/p&gt;

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

&lt;p&gt;Check out the &lt;a href="https://ai-screenshot.vercel.app/" rel="noopener noreferrer"&gt;Demo&lt;/a&gt;.&lt;br&gt;
Below are a few key features of the app:&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Upload Interface&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Drag-and-drop feature for uploading screenshots with instant AI analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speak to images&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
You can ask questions about your screenshots, or images.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Screenshot Gallery&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Screenshots are automatically named with what the AI will describe."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Text Search&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Use the OCR feature to search through the text found in screenshots (e.g., receipts, documents).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;

&lt;p&gt;Find the source code for the project on &lt;a href="https://github.com/jadouse5/ai-screenshot-organiser" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next.js&lt;/strong&gt;: Frontend and backend (serverless API routes).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pinata’s Files API&lt;/strong&gt;: For decentralized file storage and retrieval on IPFS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GROQ API’s LLaMA 3.2 11B&lt;/strong&gt;: For vision capabilities and text extraction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vercel&lt;/strong&gt;: Deployment platform ensuring scalability and speed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS&lt;/strong&gt;: For styling and responsive UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadcn/ui &amp;amp; Aceternity UI&lt;/strong&gt;: UI components library.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  More Details
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pinata’s Files API&lt;/strong&gt; is used to securely store screenshots and retrieve them from IPFS, ensuring decentralized storage and reliability. Pinata excels at handling multiple files, enabling users to store and access their screenshots quickly, even when dealing with large collections.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;AI analysis&lt;/strong&gt; uses &lt;strong&gt;GROQ’s LLaMA 3.2 11B&lt;/strong&gt; model to automatically categorize screenshots into appropriate names based on its' content, and extract text via OCR for easy search functionality. Although each image needs to be processed one at a time, Pinata’s decentralized storage makes this manageable by allowing users to upload many images at once, which can then be queued for AI processing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This powerful combination of Pinata’s decentralized storage and GROQ’s AI capabilities makes this tool incredibly useful for a wide range of users—whether it’s for work, personal organization, or creative projects.&lt;/p&gt;
&lt;h2&gt;
  
  
  Future Improvements
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Bulk image processing&lt;/strong&gt;: Overcoming the single image limitation by exploring options for batch image analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Advanced categorization algorithms&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced search functionality&lt;/strong&gt; using more refined OCR text extraction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User authentication&lt;/strong&gt; and personal galleries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time collaboration&lt;/strong&gt; for sharing and organizing screenshots.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Running the Repository
&lt;/h2&gt;

&lt;p&gt;To run this project locally, follow these steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Clone the repository&lt;/span&gt;
git clone https://github.com/yourusername/screenshot-organizer.git
&lt;span class="nb"&gt;cd &lt;/span&gt;screenshot-organizer

&lt;span class="c"&gt;# 2. Install dependencies&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# 3. Set up environment variables&lt;/span&gt;
&lt;span class="c"&gt;# Create a .env.local file in the root directory and add:&lt;/span&gt;
&lt;span class="nv"&gt;PINATA_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_pinata_api_key
&lt;span class="nv"&gt;PINATA_SECRET_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_pinata_secret_key
&lt;span class="nv"&gt;GROQ_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_groq_api_key

&lt;span class="c"&gt;# 4. Run the development server&lt;/span&gt;
npm run dev

&lt;span class="c"&gt;# 5. Open your browser and navigate to&lt;/span&gt;
http://localhost:3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  devchallenge #pinatachallenge #webdev #api #decentralizedstorage #AIanalysis #moroccoaisolutions
&lt;/h1&gt;

</description>
      <category>devchallenge</category>
      <category>pinatachallenge</category>
      <category>webdev</category>
      <category>api</category>
    </item>
  </channel>
</rss>
