{ "cells": [ { "cell_type": "markdown", "id": "a98030af-fcd1-4d63-a36e-38ba053498fa", "metadata": {}, "source": [ "# A full business solution\n", "\n", "## Now we will take our project from Day 1 to the next level\n", "\n", "### BUSINESS CHALLENGE:\n", "\n", "Create a product that builds a Brochure for a company to be used for prospective clients, investors and potential recruits.\n", "\n", "We will be provided a company name and their primary website.\n", "\n", "See the end of this notebook for examples of real-world business applications.\n", "\n", "And remember: I'm always available if you have problems or ideas! Please do reach out." ] }, { "cell_type": "code", "execution_count": 1, "id": "d5b08506-dc8b-4443-9201-5f1848161363", "metadata": {}, "outputs": [], "source": [ "# imports\n", "# If these fail, please check you're running from an 'activated' environment with (llms) in the command prompt\n", "\n", "import os\n", "import requests\n", "import json\n", "from typing import List\n", "from dotenv import load_dotenv\n", "from bs4 import BeautifulSoup\n", "from IPython.display import Markdown, display, update_display\n", "from openai import OpenAI" ] }, { "cell_type": "code", "execution_count": 2, "id": "fc5d8880-f2ee-4c06-af16-ecbc0262af61", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "API key looks good so far\n" ] } ], "source": [ "# Initialize and constants\n", "\n", "load_dotenv(override=True)\n", "api_key = os.getenv('OPENAI_API_KEY')\n", "\n", "if api_key and api_key.startswith('sk-proj-') and len(api_key)>10:\n", " print(\"API key looks good so far\")\n", "else:\n", " print(\"There might be a problem with your API key? Please visit the troubleshooting notebook!\")\n", " \n", "MODEL = 'gpt-4o-mini'\n", "openai = OpenAI()" ] }, { "cell_type": "code", "execution_count": 3, "id": "106dd65e-90af-4ca8-86b6-23a41840645b", "metadata": {}, "outputs": [], "source": [ "# A class to represent a Webpage\n", "\n", "# Some websites need you to use proper headers when fetching them:\n", "headers = {\n", " \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36\"\n", "}\n", "\n", "class Website:\n", " \"\"\"\n", " A utility class to represent a Website that we have scraped, now with links\n", " \"\"\"\n", "\n", " def __init__(self, url):\n", " self.url = url\n", " response = requests.get(url, headers=headers)\n", " self.body = response.content\n", " soup = BeautifulSoup(self.body, 'html.parser')\n", " self.title = soup.title.string if soup.title else \"No title found\"\n", " if soup.body:\n", " for irrelevant in soup.body([\"script\", \"style\", \"img\", \"input\"]):\n", " irrelevant.decompose()\n", " self.text = soup.body.get_text(separator=\"\\n\", strip=True)\n", " else:\n", " self.text = \"\"\n", " links = [link.get('href') for link in soup.find_all('a')]\n", " self.links = [link for link in links if link]\n", "\n", " def get_contents(self):\n", " return f\"Webpage Title:\\n{self.title}\\nWebpage Contents:\\n{self.text}\\n\\n\"" ] }, { "cell_type": "code", "execution_count": 4, "id": "e30d8128-933b-44cc-81c8-ab4c9d86589a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['https://edwarddonner.com/',\n", " 'https://edwarddonner.com/connect-four/',\n", " 'https://edwarddonner.com/outsmart/',\n", " 'https://edwarddonner.com/about-me-and-about-nebula/',\n", " 'https://edwarddonner.com/posts/',\n", " 'https://edwarddonner.com/',\n", " 'https://news.ycombinator.com',\n", " 'https://nebula.io/?utm_source=ed&utm_medium=referral',\n", " 'https://www.prnewswire.com/news-releases/wynden-stark-group-acquires-nyc-venture-backed-tech-startup-untapt-301269512.html',\n", " 'https://patents.google.com/patent/US20210049536A1/',\n", " 'https://www.linkedin.com/in/eddonner/',\n", " 'https://edwarddonner.com/2025/01/23/llm-workshop-hands-on-with-agents-resources/',\n", " 'https://edwarddonner.com/2025/01/23/llm-workshop-hands-on-with-agents-resources/',\n", " 'https://edwarddonner.com/2024/12/21/llm-resources-superdatascience/',\n", " 'https://edwarddonner.com/2024/12/21/llm-resources-superdatascience/',\n", " 'https://edwarddonner.com/2024/11/13/llm-engineering-resources/',\n", " 'https://edwarddonner.com/2024/11/13/llm-engineering-resources/',\n", " 'https://edwarddonner.com/2024/10/16/from-software-engineer-to-ai-data-scientist-resources/',\n", " 'https://edwarddonner.com/2024/10/16/from-software-engineer-to-ai-data-scientist-resources/',\n", " 'https://edwarddonner.com/',\n", " 'https://edwarddonner.com/connect-four/',\n", " 'https://edwarddonner.com/outsmart/',\n", " 'https://edwarddonner.com/about-me-and-about-nebula/',\n", " 'https://edwarddonner.com/posts/',\n", " 'mailto:hello@mygroovydomain.com',\n", " 'https://www.linkedin.com/in/eddonner/',\n", " 'https://twitter.com/edwarddonner',\n", " 'https://www.facebook.com/edward.donner.52']" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ed = Website(\"https://edwarddonner.com\")\n", "ed.links" ] }, { "cell_type": "markdown", "id": "1771af9c-717a-4fca-bbbe-8a95893312c3", "metadata": {}, "source": [ "## First step: Have GPT-4o-mini figure out which links are relevant\n", "\n", "### Use a call to gpt-4o-mini to read the links on a webpage, and respond in structured JSON. \n", "It should decide which links are relevant, and replace relative links such as \"/about\" with \"https://company.com/about\". \n", "We will use \"one shot prompting\" in which we provide an example of how it should respond in the prompt.\n", "\n", "This is an excellent use case for an LLM, because it requires nuanced understanding. Imagine trying to code this without LLMs by parsing and analyzing the webpage - it would be very hard!\n", "\n", "Sidenote: there is a more advanced technique called \"Structured Outputs\" in which we require the model to respond according to a spec. We cover this technique in Week 8 during our autonomous Agentic AI project." ] }, { "cell_type": "code", "execution_count": 5, "id": "6957b079-0d96-45f7-a26a-3487510e9b35", "metadata": {}, "outputs": [], "source": [ "link_system_prompt = \"You are provided with a list of links found on a webpage. \\\n", "You are able to decide which of the links would be most relevant to include in a brochure about the company, \\\n", "such as links to an About page, or a Company page, or Careers/Jobs pages.\\n\"\n", "link_system_prompt += \"You should respond in JSON as in this example:\"\n", "link_system_prompt += \"\"\"\n", "{\n", " \"links\": [\n", " {\"type\": \"about page\", \"url\": \"https://full.url/goes/here/about\"},\n", " {\"type\": \"careers page\": \"url\": \"https://another.full.url/careers\"}\n", " ]\n", "}\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 6, "id": "b97e4068-97ed-4120-beae-c42105e4d59a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "You are provided with a list of links found on a webpage. You are able to decide which of the links would be most relevant to include in a brochure about the company, such as links to an About page, or a Company page, or Careers/Jobs pages.\n", "You should respond in JSON as in this example:\n", "{\n", " \"links\": [\n", " {\"type\": \"about page\", \"url\": \"https://full.url/goes/here/about\"},\n", " {\"type\": \"careers page\": \"url\": \"https://another.full.url/careers\"}\n", " ]\n", "}\n", "\n" ] } ], "source": [ "print(link_system_prompt)" ] }, { "cell_type": "code", "execution_count": 7, "id": "8e1f601b-2eaf-499d-b6b8-c99050c9d6b3", "metadata": {}, "outputs": [], "source": [ "def get_links_user_prompt(website):\n", " user_prompt = f\"Here is the list of links on the website of {website.url} - \"\n", " user_prompt += \"please decide which of these are relevant web links for a brochure about the company, respond with the full https URL in JSON format. \\\n", "Do not include Terms of Service, Privacy, email links.\\n\"\n", " user_prompt += \"Links (some might be relative links):\\n\"\n", " user_prompt += \"\\n\".join(website.links)\n", " return user_prompt" ] }, { "cell_type": "code", "execution_count": 8, "id": "6bcbfa78-6395-4685-b92c-22d592050fd7", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Here is the list of links on the website of https://edwarddonner.com - please decide which of these are relevant web links for a brochure about the company, respond with the full https URL in JSON format. Do not include Terms of Service, Privacy, email links.\n", "Links (some might be relative links):\n", "https://edwarddonner.com/\n", "https://edwarddonner.com/connect-four/\n", "https://edwarddonner.com/outsmart/\n", "https://edwarddonner.com/about-me-and-about-nebula/\n", "https://edwarddonner.com/posts/\n", "https://edwarddonner.com/\n", "https://news.ycombinator.com\n", "https://nebula.io/?utm_source=ed&utm_medium=referral\n", "https://www.prnewswire.com/news-releases/wynden-stark-group-acquires-nyc-venture-backed-tech-startup-untapt-301269512.html\n", "https://patents.google.com/patent/US20210049536A1/\n", "https://www.linkedin.com/in/eddonner/\n", "https://edwarddonner.com/2025/01/23/llm-workshop-hands-on-with-agents-resources/\n", "https://edwarddonner.com/2025/01/23/llm-workshop-hands-on-with-agents-resources/\n", "https://edwarddonner.com/2024/12/21/llm-resources-superdatascience/\n", "https://edwarddonner.com/2024/12/21/llm-resources-superdatascience/\n", "https://edwarddonner.com/2024/11/13/llm-engineering-resources/\n", "https://edwarddonner.com/2024/11/13/llm-engineering-resources/\n", "https://edwarddonner.com/2024/10/16/from-software-engineer-to-ai-data-scientist-resources/\n", "https://edwarddonner.com/2024/10/16/from-software-engineer-to-ai-data-scientist-resources/\n", "https://edwarddonner.com/\n", "https://edwarddonner.com/connect-four/\n", "https://edwarddonner.com/outsmart/\n", "https://edwarddonner.com/about-me-and-about-nebula/\n", "https://edwarddonner.com/posts/\n", "mailto:hello@mygroovydomain.com\n", "https://www.linkedin.com/in/eddonner/\n", "https://twitter.com/edwarddonner\n", "https://www.facebook.com/edward.donner.52\n" ] } ], "source": [ "print(get_links_user_prompt(ed))" ] }, { "cell_type": "code", "execution_count": 9, "id": "a29aca19-ca13-471c-a4b4-5abbfa813f69", "metadata": {}, "outputs": [], "source": [ "def get_links(url):\n", " website = Website(url)\n", " response = openai.chat.completions.create(\n", " model=MODEL,\n", " messages=[\n", " {\"role\": \"system\", \"content\": link_system_prompt},\n", " {\"role\": \"user\", \"content\": get_links_user_prompt(website)}\n", " ],\n", " response_format={\"type\": \"json_object\"}\n", " )\n", " result = response.choices[0].message.content\n", " return json.loads(result)" ] }, { "cell_type": "code", "execution_count": 13, "id": "74a827a0-2782-4ae5-b210-4a242a8b4cc2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['/',\n", " '/models',\n", " '/datasets',\n", " '/spaces',\n", " '/posts',\n", " '/docs',\n", " '/enterprise',\n", " '/pricing',\n", " '/login',\n", " '/join',\n", " '/spaces',\n", " '/models',\n", " '/deepseek-ai/DeepSeek-V3-0324',\n", " '/Qwen/Qwen2.5-Omni-7B',\n", " '/manycore-research/SpatialLM-Llama-1B',\n", " '/ds4sd/SmolDocling-256M-preview',\n", " '/ByteDance/InfiniteYou',\n", " '/models',\n", " '/spaces/ByteDance/InfiniteYou-FLUX',\n", " '/spaces/enzostvs/deepsite',\n", " '/spaces/3DAIGC/LHM',\n", " '/spaces/Trudy/gemini-codrawing',\n", " '/spaces/Qwen/Qwen2.5-Omni-7B-Demo',\n", " '/spaces',\n", " '/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset-v1',\n", " '/datasets/glaiveai/reasoning-v1-20m',\n", " '/datasets/FreedomIntelligence/medical-o1-reasoning-SFT',\n", " '/datasets/a-m-team/AM-DeepSeek-R1-Distilled-1.4M',\n", " '/datasets/PixelAI-Team/TalkBody4D',\n", " '/datasets',\n", " '/join',\n", " '/pricing#endpoints',\n", " '/pricing#spaces',\n", " '/pricing',\n", " '/enterprise',\n", " '/enterprise',\n", " '/enterprise',\n", " '/enterprise',\n", " '/enterprise',\n", " '/enterprise',\n", " '/enterprise',\n", " '/allenai',\n", " '/facebook',\n", " '/amazon',\n", " '/google',\n", " '/Intel',\n", " '/microsoft',\n", " '/grammarly',\n", " '/Writer',\n", " '/docs/transformers',\n", " '/docs/diffusers',\n", " '/docs/safetensors',\n", " '/docs/huggingface_hub',\n", " '/docs/tokenizers',\n", " '/docs/trl',\n", " '/docs/transformers.js',\n", " '/docs/smolagents',\n", " '/docs/peft',\n", " '/docs/datasets',\n", " '/docs/text-generation-inference',\n", " '/docs/accelerate',\n", " '/models',\n", " '/datasets',\n", " '/spaces',\n", " '/tasks',\n", " 'https://ui.endpoints.huggingface.co',\n", " '/chat',\n", " '/huggingface',\n", " '/brand',\n", " '/terms-of-service',\n", " '/privacy',\n", " 'https://apply.workable.com/huggingface/',\n", " 'mailto:press@huggingface.co',\n", " '/learn',\n", " '/docs',\n", " '/blog',\n", " 'https://discuss.huggingface.co',\n", " 'https://status.huggingface.co/',\n", " 'https://github.com/huggingface',\n", " 'https://twitter.com/huggingface',\n", " 'https://www.linkedin.com/company/huggingface/',\n", " '/join/discord']" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Anthropic has made their site harder to scrape, so I'm using HuggingFace..\n", "\n", "huggingface = Website(\"https://huggingface.co\")\n", "huggingface.links\n", "\n", "# anthropic_page = Website(\"https://anthropic.com\")\n", "# anthropic_page.links" ] }, { "cell_type": "code", "execution_count": 11, "id": "d3d583e2-dcc4-40cc-9b28-1e8dbf402924", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'links': [{'type': 'about page', 'url': 'https://huggingface.co/huggingface'},\n", " {'type': 'careers page', 'url': 'https://apply.workable.com/huggingface/'},\n", " {'type': 'enterprise page', 'url': 'https://huggingface.co/enterprise'},\n", " {'type': 'pricing page', 'url': 'https://huggingface.co/pricing'},\n", " {'type': 'blog page', 'url': 'https://huggingface.co/blog'},\n", " {'type': 'company page',\n", " 'url': 'https://www.linkedin.com/company/huggingface/'}]}" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_links(\"https://huggingface.co\")" ] }, { "cell_type": "markdown", "id": "0d74128e-dfb6-47ec-9549-288b621c838c", "metadata": {}, "source": [ "## Second step: make the brochure!\n", "\n", "Assemble all the details into another prompt to GPT4-o" ] }, { "cell_type": "code", "execution_count": 14, "id": "85a5b6e2-e7ef-44a9-bc7f-59ede71037b5", "metadata": {}, "outputs": [], "source": [ "def get_all_details(url):\n", " result = \"Landing page:\\n\"\n", " result += Website(url).get_contents()\n", " links = get_links(url)\n", " print(\"Found links:\", links)\n", " for link in links[\"links\"]:\n", " result += f\"\\n\\n{link['type']}\\n\"\n", " result += Website(link[\"url\"]).get_contents()\n", " return result" ] }, { "cell_type": "code", "execution_count": 18, "id": "5099bd14-076d-4745-baf3-dac08d8e5ab2", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Found links: {'links': [{'type': 'about page', 'url': 'https://huggingface.co/huggingface'}, {'type': 'careers page', 'url': 'https://apply.workable.com/huggingface/'}, {'type': 'company page', 'url': 'https://www.linkedin.com/company/huggingface/'}]}\n" ] }, { "data": { "text/plain": [ "'Landing page:\\nWebpage Title:\\nHugging Face – The AI community building the future.\\nWebpage Contents:\\nHugging Face\\nModels\\nDatasets\\nSpaces\\nPosts\\nDocs\\nEnterprise\\nPricing\\nLog In\\nSign Up\\nThe AI community building the future.\\nThe platform where the machine learning community collaborates on models, datasets, and applications.\\nExplore AI Apps\\nor\\nBrowse 1M+ models\\nTrending on\\nthis week\\nModels\\ndeepseek-ai/DeepSeek-V3-0324\\nUpdated\\n2 days ago\\n•\\n60.5k\\n•\\n1.95k\\nQwen/Qwen2.5-Omni-7B\\nUpdated\\nabout 22 hours ago\\n•\\n27.9k\\n•\\n792\\nmanycore-research/SpatialLM-Llama-1B\\nUpdated\\n8 days ago\\n•\\n11.6k\\n•\\n779\\nds4sd/SmolDocling-256M-preview\\nUpdated\\n6 days ago\\n•\\n48.4k\\n•\\n1.02k\\nByteDance/InfiniteYou\\nUpdated\\n4 days ago\\n•\\n465\\nBrowse 1M+ models\\nSpaces\\nRunning\\non\\nZero\\n528\\n528\\nInfiniteYou-FLUX\\n📸\\nFlexible Photo Recrafting While Preserving Your Identity\\nRunning\\n236\\n236\\nDeepSite\\n🐳\\nImagine and Share in 1-Click\\nRunning\\non\\nZero\\n223\\n223\\nLHM\\n⚡\\nLarge Animatable Human Model\\nRunning\\n348\\n348\\nGemini Co-Drawing\\n✏\\nGemini 2.0 native image generation co-doodling\\nRunning\\n153\\n153\\nQwen2.5 Omni 7B Demo\\n🏆\\nSubmit media inputs to generate text and speech responses\\nBrowse 400k+ applications\\nDatasets\\nnvidia/Llama-Nemotron-Post-Training-Dataset-v1\\nUpdated\\n11 days ago\\n•\\n8.05k\\n•\\n264\\nglaiveai/reasoning-v1-20m\\nUpdated\\n10 days ago\\n•\\n6.84k\\n•\\n126\\nFreedomIntelligence/medical-o1-reasoning-SFT\\nUpdated\\nFeb 22\\n•\\n25.5k\\n•\\n573\\na-m-team/AM-DeepSeek-R1-Distilled-1.4M\\nUpdated\\n1 day ago\\n•\\n3.79k\\n•\\n74\\nPixelAI-Team/TalkBody4D\\nUpdated\\n4 days ago\\n•\\n66\\n•\\n44\\nBrowse 250k+ datasets\\nThe Home of Machine Learning\\nCreate, discover and collaborate on ML better.\\nThe collaboration platform\\nHost and collaborate on unlimited public models, datasets and applications.\\nMove faster\\nWith the HF Open source stack.\\nExplore all modalities\\nText, image, video, audio or even 3D.\\nBuild your portfolio\\nShare your work with the world and build your ML profile.\\nSign Up\\nAccelerate your ML\\nWe provide paid Compute and Enterprise solutions.\\nCompute\\nDeploy on optimized\\nInference Endpoints\\nor update your\\nSpaces applications\\nto a GPU in a few clicks.\\nView pricing\\nStarting at $0.60/hour for GPU\\nEnterprise\\nGive your team the most advanced platform to build AI with enterprise-grade security, access controls and\\n\\t\\t\\tdedicated support.\\nGetting started\\nStarting at $20/user/month\\nSingle Sign-On\\nRegions\\nPriority Support\\nAudit Logs\\nResource Groups\\nPrivate Datasets Viewer\\nMore than 50,000 organizations are using Hugging Face\\nAi2\\nEnterprise\\nnon-profit\\n•\\n396 models\\n•\\n2.97k followers\\nAI at Meta\\nEnterprise\\ncompany\\n•\\n2.07k models\\n•\\n5.29k followers\\nAmazon\\ncompany\\n•\\n10 models\\n•\\n2.92k followers\\nGoogle\\ncompany\\n•\\n974 models\\n•\\n10.7k followers\\nIntel\\ncompany\\n•\\n219 models\\n•\\n2.37k followers\\nMicrosoft\\ncompany\\n•\\n365 models\\n•\\n10.7k followers\\nGrammarly\\nEnterprise\\ncompany\\n•\\n10 models\\n•\\n146 followers\\nWriter\\nEnterprise\\ncompany\\n•\\n21 models\\n•\\n253 followers\\nOur Open Source\\nWe are building the foundation of ML tooling with the community.\\nTransformers\\n142,113\\nState-of-the-art ML for PyTorch, TensorFlow, JAX\\nDiffusers\\n28,309\\nState-of-the-art Diffusion models in PyTorch\\nSafetensors\\n3,190\\nSafe way to store/distribute neural network weights\\nHub Python Library\\n2,471\\nPython client to interact with the Hugging Face Hub\\nTokenizers\\n9,539\\nFast tokenizers optimized for research & production\\nTRL\\n12,903\\nTrain transformers LMs with reinforcement learning\\nTransformers.js\\n13,317\\nState-of-the-art ML running directly in your browser\\nsmolagents\\n15,962\\nSmol library to build great agents in Python\\nPEFT\\n17,935\\nParameter-efficient finetuning for large language models\\nDatasets\\n19,896\\nAccess & share datasets for any ML tasks\\nText Generation Inference\\n9,940\\nServe language models with TGI optimized toolkit\\nAccelerate\\n8,550\\nTrain PyTorch models with multi-GPU, TPU, mixed precision\\nSystem theme\\nWebsite\\nModels\\nDatasets\\nSpaces\\nTasks\\nInference Endpoints\\nHuggingChat\\nCompany\\nAbout\\nBrand assets\\nTerms of service\\nPrivacy\\nJobs\\nPress\\nResources\\nLearn\\nDocumentation\\nBlog\\nForum\\nService Status\\nSocial\\nGitHub\\nTwitter\\nLinkedIn\\nDiscord\\nZhihu\\nWeChat\\n\\n\\n\\nabout page\\nWebpage Title:\\nhuggingface (Hugging Face)\\nWebpage Contents:\\nHugging Face\\nModels\\nDatasets\\nSpaces\\nPosts\\nDocs\\nEnterprise\\nPricing\\nLog In\\nSign Up\\nHugging Face\\nEnterprise\\ncompany\\nVerified\\nhttps://huggingface.co\\nhuggingface\\nhuggingface\\nActivity Feed\\nFollow\\n28,331\\nAI & ML interests\\nThe AI community building the future.\\nRecent Activity\\ncoyotte508\\nnew\\nactivity\\nabout 21 hours ago\\nhuggingface/HuggingDiscussions:\\n[FEEDBACK] Notifications\\nWauplin\\nupdated\\na dataset\\nabout 22 hours ago\\nhuggingface/documentation-images\\nlysandre\\nupdated\\na dataset\\nabout 23 hours ago\\nhuggingface/transformers-metadata\\nView all activity\\nArticles\\nYay! Organizations can now publish blog Articles\\nJan 20\\n•\\n37\\nTeam members\\n209\\n+175\\n+162\\n+141\\n+131\\n+111\\nOrganization Card\\nCommunity\\nAbout org cards\\n👋 Hi!\\nWe are on a mission to democratize\\ngood\\nmachine learning, one commit at a time.\\nIf that sounds like something you should be doing, why don\\'t you\\njoin us\\n!\\nFor press enquiries, you can\\n✉️ contact our team here\\n.\\nCollections\\n1\\nDistilBERT release\\nOriginal DistilBERT model, checkpoints obtained from using teacher-student learning from the original BERT checkpoints.\\ndistilbert/distilbert-base-cased\\nFill-Mask\\n•\\nUpdated\\nMay 6, 2024\\n•\\n493k\\n•\\n•\\n38\\ndistilbert/distilbert-base-uncased\\nFill-Mask\\n•\\nUpdated\\nMay 6, 2024\\n•\\n12M\\n•\\n•\\n653\\ndistilbert/distilbert-base-multilingual-cased\\nFill-Mask\\n•\\nUpdated\\nMay 6, 2024\\n•\\n2.32M\\n•\\n•\\n182\\ndistilbert/distilbert-base-uncased-finetuned-sst-2-english\\nText Classification\\n•\\nUpdated\\nDec 19, 2023\\n•\\n7.15M\\n•\\n•\\n720\\nspaces\\n26\\nSort:\\xa0\\n\\t\\tRecently updated\\npinned\\nRunning\\n77\\nNumber Tokenization Blog\\n📈\\nExplore how tokenization affects arithmetic in LLMs\\nhuggingface\\nDec 14, 2024\\nRunning\\nSpace Build\\n🐨\\nGenerate static files for spaces\\nhuggingface\\n1 day ago\\nRunning\\n10\\nInferenceSupport\\n💥\\nDiscussions about the Inference Providers feature on the Hub\\nhuggingface\\n2 days ago\\nRunning\\n135\\nInference Playground\\n🔋\\nSet webpage theme based on user preference or system settings\\nhuggingface\\n3 days ago\\nRunning\\n348\\nAI Deadlines\\n⚡\\nSchedule tasks efficiently using AI-generated deadlines\\nhuggingface\\n14 days ago\\nRunning\\n532\\nOpen Source Ai Year In Review 2024\\n😻\\nWhat happened in open-source AI this year, and what’s next?\\nhuggingface\\nJan 8\\nExpand 26\\n\\t\\t\\t\\t\\t\\t\\tspaces\\nmodels\\n16\\nSort:\\xa0\\n\\t\\tRecently updated\\nhuggingface/timesfm-tourism-monthly\\nUpdated\\nDec 9, 2024\\n•\\n268\\n•\\n1\\nhuggingface/CodeBERTa-language-id\\nText Classification\\n•\\nUpdated\\nMar 29, 2024\\n•\\n7.14k\\n•\\n•\\n59\\nhuggingface/falcon-40b-gptq\\nText Generation\\n•\\nUpdated\\nJun 14, 2023\\n•\\n15\\n•\\n12\\nhuggingface/autoformer-tourism-monthly\\nUpdated\\nMay 24, 2023\\n•\\n40.8k\\n•\\n9\\nhuggingface/distilbert-base-uncased-finetuned-mnli\\nText Classification\\n•\\nUpdated\\nMar 22, 2023\\n•\\n226\\n•\\n•\\n2\\nhuggingface/informer-tourism-monthly\\nUpdated\\nFeb 24, 2023\\n•\\n40.4k\\n•\\n6\\nhuggingface/time-series-transformer-tourism-monthly\\nUpdated\\nFeb 23, 2023\\n•\\n9.54k\\n•\\n20\\nhuggingface/the-no-branch-repo\\nText-to-Image\\n•\\nUpdated\\nFeb 10, 2023\\n•\\n24\\n•\\n4\\nhuggingface/CodeBERTa-small-v1\\nFill-Mask\\n•\\nUpdated\\nJun 27, 2022\\n•\\n36.3k\\n•\\n80\\nhuggingface/test-model-repo\\nUpdated\\nNov 19, 2021\\n•\\n1\\nExpand 16\\n\\t\\t\\t\\t\\t\\t\\tmodels\\ndatasets\\n42\\nSort:\\xa0\\n\\t\\tRecently updated\\nhuggingface/documentation-images\\nViewer\\n•\\nUpdated\\nabout 22 hours ago\\n•\\n52\\n•\\n4.19M\\n•\\n57\\nhuggingface/transformers-metadata\\nViewer\\n•\\nUpdated\\nabout 23 hours ago\\n•\\n1.59k\\n•\\n1.6k\\n•\\n20\\nhuggingface/policy-docs\\nUpdated\\n9 days ago\\n•\\n2.58k\\n•\\n10\\nhuggingface/diffusers-metadata\\nViewer\\n•\\nUpdated\\n14 days ago\\n•\\n69\\n•\\n590\\n•\\n6\\nhuggingface/gemini-results-2025-03-03\\nViewer\\n•\\nUpdated\\n25 days ago\\n•\\n17\\n•\\n60\\nhuggingface/gemini-results-2025-02-28\\nViewer\\n•\\nUpdated\\n28 days ago\\n•\\n21\\n•\\n53\\nhuggingface/gemini-results-2025-02-27\\nViewer\\n•\\nUpdated\\n29 days ago\\n•\\n24\\n•\\n57\\nhuggingface/gemini-results-2025-02-25\\nViewer\\n•\\nUpdated\\nFeb 26\\n•\\n32\\n•\\n56\\nhuggingface/gemini-results-2025-02-24\\nViewer\\n•\\nUpdated\\nFeb 25\\n•\\n32\\n•\\n49\\nhuggingface/gemini-results-2025-02-21\\nViewer\\n•\\nUpdated\\nFeb 22\\n•\\n29\\n•\\n134\\n•\\n1\\nExpand 42\\n\\t\\t\\t\\t\\t\\t\\tdatasets\\nSystem theme\\nCompany\\nTOS\\nPrivacy\\nAbout\\nJobs\\nWebsite\\nModels\\nDatasets\\nSpaces\\nPricing\\nDocs\\n\\n\\n\\ncareers page\\nWebpage Title:\\nHugging Face - Current Openings\\nWebpage Contents:\\n\\n\\n\\n\\ncompany page\\nWebpage Title:\\nHugging Face | LinkedIn\\nWebpage Contents:\\nSkip to main content\\nLinkedIn\\nArticles\\nPeople\\nLearning\\nJobs\\nGames\\nGet the app\\nJoin now\\nSign in\\nHugging Face\\nSoftware Development\\nThe AI community building the future.\\nSee jobs\\nFollow\\nView all 515 employees\\nReport this company\\nAbout us\\nThe AI community building the future.\\nWebsite\\nhttps://huggingface.co\\nExternal link for Hugging Face\\nIndustry\\nSoftware Development\\nCompany size\\n51-200 employees\\nType\\nPrivately Held\\nFounded\\n2016\\nSpecialties\\nmachine learning, natural language processing, and deep learning\\nProducts\\nHugging Face\\nHugging Face\\nNatural Language Processing (NLP) Software\\nWe’re on a journey to solve and democratize artificial intelligence through natural language.\\nLocations\\nPrimary\\nGet directions\\nParis, FR\\nGet directions\\nEmployees at Hugging Face\\nLudovic Huraux\\nBassem ASSEH\\nRajat Arya\\nTech Lead & Software Engineer @ HF | prev: co-founder XetHub, Apple, Turi, AWS, Microsoft\\nJeff Boudier\\nProduct + Growth at Hugging Face\\nSee all employees\\nUpdates\\nHugging Face\\nreposted this\\nGradio\\n60,769 followers\\n23h\\nEdited\\nReport this post\\nHi3DGen 🔥 \\n\\nHigh-fidelity 3D geometry generation from a single image by leveraging normal maps as an intermediate representation\\n\\nPlay with the fantastic app on\\nHugging Face\\nnow:\\nhttps://lnkd.in/g99NpV_y\\n…more\\n153\\n3 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nFreddy Boulton\\nSoftware Engineer @ 🤗\\n1d\\nReport this post\\nGenerate lifelike audio in real-time without a GPU! 🚀\\n\\nCheck out orpheus-cpp: a\\nllama.cpp\\nport of orpheus 3b text-to-speech model with built-in support for sync and async streaming.\\n\\n𝚙𝚒𝚙 𝚒𝚗𝚜𝚝𝚊𝚕𝚕 𝚘𝚛𝚙𝚑𝚎𝚞𝚜-𝚌𝚙𝚙\\n𝚙𝚢𝚝𝚑𝚘𝚗 -𝚖 𝚘𝚛𝚙𝚑𝚎𝚞𝚜_𝚌𝚙𝚙\\n\\nProject code:\\nhttps://lnkd.in/ekPpN9mc\\n…more\\n313\\n7 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nGradio\\n60,769 followers\\n3d\\nReport this post\\nWe just turned the humble dataframe into a superweapon⚡️\\ndashboarding will never be the same!! 📊\\n\\nnew Gradio Dataframe has:\\n- multi-cell selection\\n- column pinning\\n- search + filtering\\n- fullscreen mode\\n- accessibility upgrades, and more\\n…more\\n97\\n12 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nMerve Noyan\\nopen-sourceress at 🤗 | Google Developer Expert in Machine Learning, MSc Candidate in Data Science\\n3d\\nReport this post\\nis your vision LM in prod even safe? 👀\\n\\nShieldGemma 2 is the first ever safety model for multimodal vision LMs in production by\\nGoogle DeepMind\\n, came with Gemma 3 🔥\\n\\nI saw confusion around how to use it, so I put together a notebook and a demo, find it in the comments 💬\\n381\\n10 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nMerve Noyan\\nopen-sourceress at 🤗 | Google Developer Expert in Machine Learning, MSc Candidate in Data Science\\n3d\\nReport this post\\nis your vision LM in prod even safe? 👀\\n\\nShieldGemma 2 is the first ever safety model for multimodal vision LMs in production by\\nGoogle DeepMind\\n, came with Gemma 3 🔥\\n\\nI saw confusion around how to use it, so I put together a notebook and a demo, find it in the comments 💬\\n381\\n10 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nSergio Paniego Blanco\\nML Engineer @ Hugging Face 🤗 | AI PhD | Google Summer of Code \\'18-\\'24\\n3d\\nReport this post\\nThe Bonus Unit 2, \"AI Agent Observability & Evaluation,\" is now live on our\\nHugging Face\\nagents course! 🎓\\n\\nYou\\'ll learn to:\\n🔧 Instrument agents with OpenTelemetry\\n📊 Track token usage, latency & errors\\n📈 Evaluate with LLM-as-a-judge\\n📚 Benchmark with GSM8K\\n\\n👉 Check out the course here:\\nhttps://lnkd.in/d2jiTx6j\\n212\\n7 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nGradio\\n60,769 followers\\n4d\\nEdited\\nReport this post\\nCreate Infinite Photographs of You with InfiniteYou-Flux!\\n\\nFlexible photo recreation that better preserves identity compared to current solutions like Pulid, IP Adapter, etc. 🔥 💪 \\n\\nCurrent full-performance bf16 model inference requires a peak VRAM of around 43 GB.\\n\\nYou can build InfU on your own hardware:\\nhttps://lnkd.in/g9dc_vVh\\nOr Play for free on\\nHugging Face\\n:\\nhttps://lnkd.in/gzF7rikZ\\n159\\n6 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nGradio\\n60,769 followers\\n4d\\nEdited\\nReport this post\\n🤯 Generate high-quality podcasts with the voices you want!\\n\\nMoonCast is an open sourced, multi-lingual, and zeroshot model.\\n\\nYou just need to upload two sample voices, create a script, and that\\'s it, run the model--You get a 🔥 notebooklm-like podcast.\\n\\nModel and App are released on\\nHugging Face\\n:\\nhttps://lnkd.in/gUk2EssP\\n151\\n8 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nDaniel Vila Suero\\nBuilding data tools @ Hugging Face 🤗\\n4d\\nEdited\\nReport this post\\n🔥 Big news for GPU poors: thanks to\\nHyperbolic\\nand\\nFireworks AI\\n, you can run\\nDeepSeek AI\\n\\'s\\xa0new model using Hugging Face Inference Providers. What has changed since V3? Here\\'s my quick home experiment 👇 \\n\\nDeepSeek silently dropped an update to V3 yesterday. Benchmark results are available, showing significant improvements over V3. \\n\\nStill, it is always a good idea to run new models on data you care about and see more detailed, fine-grained results.\\n\\nNow that we can all run these new models from Day 0 with no GPUs required, I wanted to share my approach with an example I created this morning:\\n\\n1. I got a sample from the LIMA dataset (containing high-quality general instructions).\\n2. Run the instructions with V3 and the new version V3-0324.\\n3. Define and run a simple judge with Llama3.3-70B to compare the model responses.\\n4. Push the dataset and pipeline so you can check and run similar experiments! (see first comment)\\n5. Extracted the results with\\nHugging Face\\nData Studio.\\n\\nResults summary\\n- LIMA is not very challenging, but it is still interesting to see the differences between the two models.\\n- A majority of Ties indicate that both models are close for this domain and task.\\n- But still, V3-0324 consistently wins over V3 (33 times vs 6 times).\\n\\nAs usual, the dataset, prompts, and pipeline are open-source (see first comment).\\n\\nWhat other experiments you\\'d like to see?\\n214\\n7 Comments\\nLike\\nComment\\nShare\\nHugging Face\\nreposted this\\nGradio\\n60,769 followers\\n4d\\nReport this post\\nStarVector is a multimodal vision-language model for generating SVG (Scalable Vector Graphics). 👇 \\n\\nIt can be used to perform image2SVG and text2SVG generation. Live demo shows how the image generation is treated similar to a code generation task, using the power of StarVector multimodal VLM! 🤩 \\n\\n🚀 Play with the app on Huggingface:\\nhttps://lnkd.in/gCzdEbvj\\n🥳 If you want to build the model locally with a gradio app:\\nhttps://lnkd.in/gDzCpdDN\\n…more\\n1,521\\n41 Comments\\nLike\\nComment\\nShare\\nJoin now to see what you are missing\\nFind people you know at Hugging Face\\nBrowse recommended jobs for you\\nView all updates, news, and articles\\nJoin now\\nSimilar pages\\nAnthropic\\nResearch Services\\nMistral AI\\nTechnology, Information and Internet\\nParis, France\\nPerplexity\\nSoftware Development\\nSan Francisco, California\\nOpenAI\\nResearch Services\\nSan Francisco, CA\\nLangChain\\nTechnology, Information and Internet\\nGenerative AI\\nTechnology, Information and Internet\\nDeepLearning.AI\\nSoftware Development\\nPalo Alto, California\\nLlamaIndex\\nTechnology, Information and Internet\\nSan Francisco, California\\nGoogle DeepMind\\nResearch Services\\nLondon, London\\nCohere\\nSoftware Development\\nToronto, Ontario\\nShow more similar pages\\nShow fewer similar pages\\nBrowse jobs\\nEngineer jobs\\n555,845 open jobs\\nMachine Learning Engineer jobs\\n148,937 open jobs\\nScientist jobs\\n48,969 open jobs\\nSoftware Engineer jobs\\n300,699 open jobs\\nAnalyst jobs\\n694,057 open jobs\\nIntern jobs\\n71,196 open jobs\\nDeveloper jobs\\n258,935 open jobs\\nManager jobs\\n1,880,925 open jobs\\nProduct Manager jobs\\n199,941 open jobs\\nDirector jobs\\n1,220,357 open jobs\\nPython Developer jobs\\n46,642 open jobs\\nData Scientist jobs\\n264,158 open jobs\\nData Analyst jobs\\n329,009 open jobs\\nSenior Software Engineer jobs\\n78,145 open jobs\\nProject Manager jobs\\n253,048 open jobs\\nResearcher jobs\\n195,654 open jobs\\nAssociate jobs\\n1,091,945 open jobs\\nData Engineer jobs\\n192,126 open jobs\\nVice President jobs\\n235,270 open jobs\\nSpecialist jobs\\n768,666 open jobs\\nShow more jobs like this\\nShow fewer jobs like this\\nFunding\\nHugging Face\\n8 total rounds\\nLast Round\\nSeries unknown\\nSep 1, 2024\\nExternal Crunchbase Link for last round of funding\\nSee more info on\\ncrunchbase\\nMore searches\\nMore searches\\nEngineer jobs\\nScientist jobs\\nMachine Learning Engineer jobs\\nSoftware Engineer jobs\\nIntern jobs\\nDeveloper jobs\\nAnalyst jobs\\nManager jobs\\nSenior Software Engineer jobs\\nData Scientist jobs\\nResearcher jobs\\nProduct Manager jobs\\nDirector jobs\\nAssociate jobs\\nIntelligence Specialist jobs\\nData Analyst jobs\\nData Science Specialist jobs\\nPython Developer jobs\\nQuantitative Analyst jobs\\nProject Manager jobs\\nAccount Executive jobs\\nSpecialist jobs\\nData Engineer jobs\\nDesigner jobs\\nQuantitative Researcher jobs\\nConsultant jobs\\nSolutions Architect jobs\\nVice President jobs\\nUser Experience Designer jobs\\nHead jobs\\nFull Stack Engineer jobs\\nEngineering Manager jobs\\nSoftware Engineer Intern jobs\\nJunior Software Engineer jobs\\nSoftware Intern jobs\\nProduct Designer jobs\\nSolutions Engineer jobs\\nStaff Software Engineer jobs\\nProgram Manager jobs\\nSenior Scientist jobs\\nWriter jobs\\nResearch Intern jobs\\nSenior Product Manager jobs\\nSummer Intern jobs\\nAccount Manager jobs\\nRecruiter jobs\\nLead jobs\\nResearch Engineer jobs\\nComputer Science Intern jobs\\nPlatform Engineer jobs\\nJunior Developer jobs\\nAndroid Developer jobs\\nUser Experience Researcher jobs\\nJava Software Engineer jobs\\nSite Reliability Engineer jobs\\nGraduate jobs\\nSoftware Engineering Manager jobs\\nRepresentative jobs\\nBusiness Development Specialist jobs\\nComputer Engineer jobs\\nLinkedIn\\n© 2025\\nAbout\\nAccessibility\\nUser Agreement\\nPrivacy Policy\\nCookie Policy\\nCopyright Policy\\nBrand Policy\\nGuest Controls\\nCommunity Guidelines\\nالعربية (Arabic)\\nবাংলা (Bangla)\\nČeština (Czech)\\nDansk (Danish)\\nDeutsch (German)\\nΕλληνικά (Greek)\\nEnglish (English)\\nEspañol (Spanish)\\nفارسی (Persian)\\nSuomi (Finnish)\\nFrançais (French)\\nहिंदी (Hindi)\\nMagyar (Hungarian)\\nBahasa Indonesia (Indonesian)\\nItaliano (Italian)\\nעברית (Hebrew)\\n日本語 (Japanese)\\n한국어 (Korean)\\nमराठी (Marathi)\\nBahasa Malaysia (Malay)\\nNederlands (Dutch)\\nNorsk (Norwegian)\\nਪੰਜਾਬੀ (Punjabi)\\nPolski (Polish)\\nPortuguês (Portuguese)\\nRomână (Romanian)\\nРусский (Russian)\\nSvenska (Swedish)\\nతెలుగు (Telugu)\\nภาษาไทย (Thai)\\nTagalog (Tagalog)\\nTürkçe (Turkish)\\nУкраїнська (Ukrainian)\\nTiếng Việt (Vietnamese)\\n简体中文 (Chinese (Simplified))\\n正體中文 (Chinese (Traditional))\\nLanguage\\nAgree & Join LinkedIn\\nBy clicking Continue to join or sign in, you agree to LinkedIn’s\\nUser Agreement\\n,\\nPrivacy Policy\\n, and\\nCookie Policy\\n.\\nSign in to see who you already know at Hugging Face\\nSign in\\nWelcome back\\nEmail or phone\\nPassword\\nShow\\nForgot password?\\nSign in\\nor\\nBy clicking Continue to join or sign in, you agree to LinkedIn’s\\nUser Agreement\\n,\\nPrivacy Policy\\n, and\\nCookie Policy\\n.\\nNew to LinkedIn?\\nJoin now\\nor\\nNew to LinkedIn?\\nJoin now\\nBy clicking Continue to join or sign in, you agree to LinkedIn’s\\nUser Agreement\\n,\\nPrivacy Policy\\n, and\\nCookie Policy\\n.\\nLinkedIn\\nLinkedIn is better on the app\\nDon’t have the app? Get it in the Microsoft Store.\\nOpen the app\\n\\n'" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_all_details(\"https://huggingface.co\")" ] }, { "cell_type": "code", "execution_count": 19, "id": "9b863a55-f86c-4e3f-8a79-94e24c1a8cf2", "metadata": {}, "outputs": [], "source": [ "system_prompt = \"You are an assistant that analyzes the contents of several relevant pages from a company website \\\n", "and creates a short brochure about the company for prospective customers, investors and recruits. Respond in markdown.\\\n", "Include details of company culture, customers and careers/jobs if you have the information.\"\n", "\n", "# Or uncomment the lines below for a more humorous brochure - this demonstrates how easy it is to incorporate 'tone':\n", "\n", "# system_prompt = \"You are an assistant that analyzes the contents of several relevant pages from a company website \\\n", "# and creates a short humorous, entertaining, jokey brochure about the company for prospective customers, investors and recruits. Respond in markdown.\\\n", "# Include details of company culture, customers and careers/jobs if you have the information.\"\n" ] }, { "cell_type": "code", "execution_count": 20, "id": "6ab83d92-d36b-4ce0-8bcc-5bb4c2f8ff23", "metadata": {}, "outputs": [], "source": [ "def get_brochure_user_prompt(company_name, url):\n", " user_prompt = f\"You are looking at a company called: {company_name}\\n\"\n", " user_prompt += f\"Here are the contents of its landing page and other relevant pages; use this information to build a short brochure of the company in markdown.\\n\"\n", " user_prompt += get_all_details(url)\n", " user_prompt = user_prompt[:5_000] # Truncate if more than 5,000 characters\n", " return user_prompt" ] }, { "cell_type": "code", "execution_count": 21, "id": "cd909e0b-1312-4ce2-a553-821e795d7572", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Found links: {'links': [{'type': 'about page', 'url': 'https://huggingface.co/huggingface'}, {'type': 'careers page', 'url': 'https://apply.workable.com/huggingface/'}, {'type': 'enterprise page', 'url': 'https://huggingface.co/enterprise'}, {'type': 'pricing page', 'url': 'https://huggingface.co/pricing'}, {'type': 'blog page', 'url': 'https://huggingface.co/blog'}, {'type': 'community page', 'url': 'https://discuss.huggingface.co'}, {'type': 'GitHub page', 'url': 'https://github.com/huggingface'}, {'type': 'LinkedIn page', 'url': 'https://www.linkedin.com/company/huggingface'}, {'type': 'Twitter page', 'url': 'https://twitter.com/huggingface'}]}\n" ] }, { "data": { "text/plain": [ "'You are looking at a company called: HuggingFace\\nHere are the contents of its landing page and other relevant pages; use this information to build a short brochure of the company in markdown.\\nLanding page:\\nWebpage Title:\\nHugging Face – The AI community building the future.\\nWebpage Contents:\\nHugging Face\\nModels\\nDatasets\\nSpaces\\nPosts\\nDocs\\nEnterprise\\nPricing\\nLog In\\nSign Up\\nThe AI community building the future.\\nThe platform where the machine learning community collaborates on models, datasets, and applications.\\nExplore AI Apps\\nor\\nBrowse 1M+ models\\nTrending on\\nthis week\\nModels\\ndeepseek-ai/DeepSeek-V3-0324\\nUpdated\\n2 days ago\\n•\\n60.5k\\n•\\n1.95k\\nQwen/Qwen2.5-Omni-7B\\nUpdated\\nabout 23 hours ago\\n•\\n27.9k\\n•\\n792\\nmanycore-research/SpatialLM-Llama-1B\\nUpdated\\n8 days ago\\n•\\n11.6k\\n•\\n779\\nds4sd/SmolDocling-256M-preview\\nUpdated\\n6 days ago\\n•\\n48.4k\\n•\\n1.02k\\nByteDance/InfiniteYou\\nUpdated\\n4 days ago\\n•\\n465\\nBrowse 1M+ models\\nSpaces\\nRunning\\non\\nZero\\n528\\n528\\nInfiniteYou-FLUX\\n📸\\nFlexible Photo Recrafting While Preserving Your Identity\\nRunning\\n236\\n236\\nDeepSite\\n🐳\\nImagine and Share in 1-Click\\nRunning\\non\\nZero\\n223\\n223\\nLHM\\n⚡\\nLarge Animatable Human Model\\nRunning\\n348\\n348\\nGemini Co-Drawing\\n✏\\nGemini 2.0 native image generation co-doodling\\nRunning\\n153\\n153\\nQwen2.5 Omni 7B Demo\\n🏆\\nSubmit media inputs to generate text and speech responses\\nBrowse 400k+ applications\\nDatasets\\nnvidia/Llama-Nemotron-Post-Training-Dataset-v1\\nUpdated\\n11 days ago\\n•\\n8.05k\\n•\\n264\\nglaiveai/reasoning-v1-20m\\nUpdated\\n10 days ago\\n•\\n6.84k\\n•\\n126\\nFreedomIntelligence/medical-o1-reasoning-SFT\\nUpdated\\nFeb 22\\n•\\n25.5k\\n•\\n573\\na-m-team/AM-DeepSeek-R1-Distilled-1.4M\\nUpdated\\n1 day ago\\n•\\n3.79k\\n•\\n74\\nPixelAI-Team/TalkBody4D\\nUpdated\\n4 days ago\\n•\\n66\\n•\\n44\\nBrowse 250k+ datasets\\nThe Home of Machine Learning\\nCreate, discover and collaborate on ML better.\\nThe collaboration platform\\nHost and collaborate on unlimited public models, datasets and applications.\\nMove faster\\nWith the HF Open source stack.\\nExplore all modalities\\nText, image, video, audio or even 3D.\\nBuild your portfolio\\nShare your work with the world and build your ML profile.\\nSign Up\\nAccelerate your ML\\nWe provide paid Compute and Enterprise solutions.\\nCompute\\nDeploy on optimized\\nInference Endpoints\\nor update your\\nSpaces applications\\nto a GPU in a few clicks.\\nView pricing\\nStarting at $0.60/hour for GPU\\nEnterprise\\nGive your team the most advanced platform to build AI with enterprise-grade security, access controls and\\n\\t\\t\\tdedicated support.\\nGetting started\\nStarting at $20/user/month\\nSingle Sign-On\\nRegions\\nPriority Support\\nAudit Logs\\nResource Groups\\nPrivate Datasets Viewer\\nMore than 50,000 organizations are using Hugging Face\\nAi2\\nEnterprise\\nnon-profit\\n•\\n396 models\\n•\\n2.97k followers\\nAI at Meta\\nEnterprise\\ncompany\\n•\\n2.07k models\\n•\\n5.29k followers\\nAmazon\\ncompany\\n•\\n10 models\\n•\\n2.92k followers\\nGoogle\\ncompany\\n•\\n974 models\\n•\\n10.7k followers\\nIntel\\ncompany\\n•\\n219 models\\n•\\n2.37k followers\\nMicrosoft\\ncompany\\n•\\n365 models\\n•\\n10.7k followers\\nGrammarly\\nEnterprise\\ncompany\\n•\\n10 models\\n•\\n146 followers\\nWriter\\nEnterprise\\ncompany\\n•\\n21 models\\n•\\n253 followers\\nOur Open Source\\nWe are building the foundation of ML tooling with the community.\\nTransformers\\n142,113\\nState-of-the-art ML for PyTorch, TensorFlow, JAX\\nDiffusers\\n28,309\\nState-of-the-art Diffusion models in PyTorch\\nSafetensors\\n3,190\\nSafe way to store/distribute neural network weights\\nHub Python Library\\n2,471\\nPython client to interact with the Hugging Face Hub\\nTokenizers\\n9,539\\nFast tokenizers optimized for research & production\\nTRL\\n12,903\\nTrain transformers LMs with reinforcement learning\\nTransformers.js\\n13,317\\nState-of-the-art ML running directly in your browser\\nsmolagents\\n15,962\\nSmol library to build great agents in Python\\nPEFT\\n17,935\\nParameter-efficient finetuning for large language models\\nDatasets\\n19,896\\nAccess & share datasets for any ML tasks\\nText Generation Inference\\n9,940\\nServe language models with TGI optimized toolkit\\nAccelerate\\n8,550\\nTrain PyTorch models with multi-GPU, TPU, mixed precision\\nSystem theme\\nWebsite\\nModels\\nDatasets\\nSpaces\\nTasks\\nInference Endpoints\\nHuggingChat\\nCompany\\nAbout\\nBrand assets\\nTerms of service\\nPrivacy\\nJobs\\nPress\\nResources\\nLearn\\nDocumentation\\nBlog\\nForum\\nService Status\\nSocial\\nGitHub\\nTwitter\\nLinkedIn\\nDiscord\\n\\n\\n\\nabout page\\nWebpage Title:\\nhuggingface (Hugging Face)\\nWebpage Contents:\\nHugging Face\\nModels\\nDatasets\\nSpaces\\nPosts\\nDocs\\nEnterprise\\nPricing\\nLog In\\nSign Up\\nHugging Face\\nEnterprise\\ncompany\\nVerified\\nhttps://huggingface.co\\nhuggingface\\nhuggingface\\nActivity Feed\\nFollow\\n28,332\\nAI & ML interests\\nThe AI community building the future.\\nRecent Activity\\ncoyotte508\\nnew\\nactivity\\nabout 21 hours ago\\nhuggingface/HuggingDiscussions:\\n[FEEDBACK] Notifications\\nWauplin\\nupdated\\na dataset\\nabout 22 hours ago\\nhuggingface/documentation-images\\nlysandre\\nupdated\\na dataset\\nabout 23 hours ago\\nhuggingface/transformers-metadata\\nView all activity\\nArticles\\nYay! Organizations can now publish blog Articles\\nJan 20\\n•\\n37\\nTeam members\\n209\\n+175\\n+162\\n+141\\n+131\\n+111\\nOrganization Card\\nCommunity\\nAbout org cards\\n👋 Hi!\\nWe are on a mission to democr'" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_brochure_user_prompt(\"HuggingFace\", \"https://huggingface.co\")" ] }, { "cell_type": "code", "execution_count": 22, "id": "e44de579-4a1a-4e6a-a510-20ea3e4b8d46", "metadata": {}, "outputs": [], "source": [ "def create_brochure(company_name, url):\n", " response = openai.chat.completions.create(\n", " model=MODEL,\n", " messages=[\n", " {\"role\": \"system\", \"content\": system_prompt},\n", " {\"role\": \"user\", \"content\": get_brochure_user_prompt(company_name, url)}\n", " ],\n", " )\n", " result = response.choices[0].message.content\n", " display(Markdown(result))" ] }, { "cell_type": "code", "execution_count": 23, "id": "e093444a-9407-42ae-924a-145730591a39", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Found links: {'links': [{'type': 'about page', 'url': 'https://huggingface.co/huggingface'}, {'type': 'careers page', 'url': 'https://apply.workable.com/huggingface/'}, {'type': 'enterprise page', 'url': 'https://huggingface.co/enterprise'}, {'type': 'pricing page', 'url': 'https://huggingface.co/pricing'}, {'type': 'blog page', 'url': 'https://huggingface.co/blog'}]}\n" ] }, { "data": { "text/markdown": [ "# Hugging Face Brochure\n", "\n", "**Hugging Face** \n", "*The AI community building the future.*\n", "\n", "---\n", "\n", "## Company Overview\n", "\n", "Hugging Face is a collaborative platform designed for the machine learning community, empowering users to build and share models, datasets, and applications. With over 1 million machine learning models and several hundred thousand datasets, we facilitate the creation, discovery, and collaboration that is essential to innovative AI solutions.\n", "\n", "---\n", "\n", "## Our Mission\n", "\n", "We are dedicated to democratizing AI technology by providing accessible and state-of-the-art tools. With our open-source commitment, we strive to empower developers and researchers worldwide to build AI models that enhance technology and improve lives.\n", "\n", "---\n", "\n", "## Key Offerings\n", "\n", "- **Models**: Access and contribute to over 1 million models tailored for various applications in text, image, video, audio, and more.\n", "- **Datasets**: A vast library of datasets exceeding 250,000, helping users in training and validating their machine learning models.\n", "- **Spaces**: A feature allowing users to showcase applications built using Hugging Face technologies and collaborate within the community.\n", "- **Enterprise Solutions**: Paid compute options and enterprise-grade solutions with dedicated support for organizations, starting at just $20 per user per month.\n", "\n", "---\n", "\n", "## Customers\n", "\n", "Our platform is utilized by more than 50,000 organizations, including industry leaders such as:\n", "\n", "- **Google**\n", "- **Microsoft**\n", "- **Amazon**\n", "- **Meta**\n", "- **Grammarly**\n", "\n", "These companies are leveraging our models and datasets to innovate and enhance their operations through AI.\n", "\n", "---\n", "\n", "## Company Culture\n", "\n", "At Hugging Face, we foster a vibrant and inclusive company culture that prioritizes:\n", "\n", "- **Collaboration**: We believe that the best innovations emerge from teamwork and open dialogue.\n", "- **Innovation**: Our team is encouraged to push the boundaries of technology, embracing a mindset of continuous improvement.\n", "- **Community-Driven**: We value contributions from all community members, and our culture reflects a commitment to learning and sharing knowledge freely.\n", "\n", "Join us as we build the future of AI.\n", "\n", "---\n", "\n", "## Career Opportunities\n", "\n", "We are always on the lookout for passionate individuals to join our team. If you’re interested in:\n", "\n", "- **Software Development**\n", "- **Research in AI/ML**\n", "- **Community Engagement**\n", "- **Product Design**\n", "\n", "We would love to hear from you! Explore our current job openings and discover how you can contribute to this exciting field.\n", "\n", "---\n", "\n", "**Ready to Collaborate?** \n", "Visit us at [Hugging Face](https://huggingface.co) to learn more, explore our offerings, or join our growing community!\n", "\n", "--- \n", "\n", "*Together, let's shape the future of AI.*" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "create_brochure(\"HuggingFace\", \"https://huggingface.co\")" ] }, { "cell_type": "markdown", "id": "61eaaab7-0b47-4b29-82d4-75d474ad8d18", "metadata": {}, "source": [ "## Finally - a minor improvement\n", "\n", "With a small adjustment, we can change this so that the results stream back from OpenAI,\n", "with the familiar typewriter animation" ] }, { "cell_type": "code", "execution_count": 24, "id": "51db0e49-f261-4137-aabe-92dd601f7725", "metadata": {}, "outputs": [], "source": [ "def stream_brochure(company_name, url):\n", " stream = openai.chat.completions.create(\n", " model=MODEL,\n", " messages=[\n", " {\"role\": \"system\", \"content\": system_prompt},\n", " {\"role\": \"user\", \"content\": get_brochure_user_prompt(company_name, url)}\n", " ],\n", " stream=True\n", " )\n", " \n", " response = \"\"\n", " display_handle = display(Markdown(\"\"), display_id=True)\n", " for chunk in stream:\n", " response += chunk.choices[0].delta.content or ''\n", " response = response.replace(\"```\",\"\").replace(\"markdown\", \"\")\n", " update_display(Markdown(response), display_id=display_handle.display_id)" ] }, { "cell_type": "code", "execution_count": 29, "id": "56bf0ae3-ee9d-4a72-9cd6-edcac67ceb6d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Found links: {'links': [{'type': 'about page', 'url': 'https://www.nvidia.com/en-eu/about-nvidia/'}, {'type': 'careers page', 'url': 'https://www.nvidia.com/en-eu/about-nvidia/careers/'}, {'type': 'company page', 'url': 'https://www.nvidia.com/en-eu/about-nvidia/executive-insights/'}, {'type': 'company page', 'url': 'https://www.nvidia.com/en-eu/about-nvidia/partners/'}, {'type': 'company page', 'url': 'https://www.nvidia.com/en-eu/research/'}, {'type': 'company page', 'url': 'https://www.nvidia.com/en-eu/foundation/'}, {'type': 'company page', 'url': 'https://www.nvidia.com/en-eu/csr/'}]}\n" ] }, { "data": { "text/markdown": [ "\n", "# NVIDIA Company Brochure\n", "\n", "## About NVIDIA\n", "\n", "NVIDIA is a global leader in artificial intelligence (AI) computing, revolutionizing the way industries leverage technology to harness the power of data. Our expertise spans various domains including gaming, automotive, healthcare, and cloud computing, establishing NVIDIA at the forefront of accelerated computing for modern applications.\n", "\n", "### Vision and Mission\n", "\n", "NVIDIA's mission is to enhance human productivity through advanced technology. We aim to drive innovation and transform industries by delivering powerful graphics and computing solutions that empower creativity and enable smarter decisions.\n", "\n", "---\n", "\n", "## Products and Services\n", "\n", "### Innovative Offerings\n", "\n", "- **Artificial Intelligence Solutions:** From generative AI to intelligent video analytics, NVIDIA is pioneering the future with cutting-edge AI tools and frameworks.\n", "- **Graphics Processing Units (GPUs):** The renowned GeForce and RTX product lines deliver unparalleled graphics performance for gaming and creative applications.\n", "- **Data Center Solutions:** Our advanced networking and cloud solutions power mission-critical applications across industries, ensuring robust and scalable computing environments.\n", "\n", "### Key Industries Served\n", "\n", "- **Gaming:** Providing gamers with the best graphical experiences through high-performance graphics cards and technologies.\n", "- **Automotive:** Leading innovations in autonomous vehicles and smart transportation systems.\n", "- **Healthcare:** Transforming clinical applications with AI-powered solutions, data analysis, and simulation tools.\n", "\n", "---\n", "\n", "## Company Culture\n", "\n", "At NVIDIA, our culture is founded on collaboration and innovation. We encourage a growth mindset while fostering an inclusive environment where every team member is empowered to contribute their ideas. Our commitment to diversity and sustainability sets the groundwork for a dynamic workplace where creativity flourishes.\n", "\n", "### Employee Engagement\n", "\n", "We believe that our employees are our greatest asset. NVIDIA offers extensive professional development opportunities, wellness programs, and a flexible work environment. We support work-life balance to ensure our team members thrive both personally and professionally.\n", "\n", "---\n", "\n", "## Join Us\n", "\n", "### Careers at NVIDIA\n", "\n", "NVIDIA is constantly seeking passionate individuals who are innovators at heart. By joining our team, you will not only take part in exciting projects at the forefront of technology, but also gain the opportunity to grow and develop within the company. \n", "\n", "- **Open Positions:** We offer a range of career paths in engineering, research, sales, and marketing. \n", "- **Inclusive Workplace:** We welcome diverse backgrounds and perspectives, aiming to create a team that mirrors our global customer base.\n", "\n", "If you're ready to push the boundaries of what's possible with us, visit our careers page to explore opportunities.\n", "\n", "---\n", "\n", "## Connect with Us\n", "\n", "For more information about our products and corporate initiatives, please visit [NVIDIA's Official Website](https://www.nvidia.com/) or reach out through our social media channels. We look forward to engaging with you!\n", "\n", "---\n", "\n", "Thank you for considering NVIDIA—where innovation and creativity meet to shape the future.\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# stream_brochure(\"HuggingFace\", \"https://huggingface.co\")\n", "# stream_brochure(\"British Council\", \"https://www.gov.uk/world/organisations/british-embassy-tel-aviv\")\n", "# stream_brochure(\"General Motors\", \"https://www.gm.com/\")\n", "stream_brochure(\"Nvidia\", \"https://www.nvidia.com/en-eu/\")" ] }, { "cell_type": "code", "execution_count": null, "id": "fdb3f8d8-a3eb-41c8-b1aa-9f60686a653b", "metadata": {}, "outputs": [], "source": [ "# Try changing the system prompt to the humorous version when you make the Brochure for Hugging Face:\n", "\n", "stream_brochure(\"HuggingFace\", \"https://huggingface.co\")" ] }, { "cell_type": "markdown", "id": "a27bf9e0-665f-4645-b66b-9725e2a959b5", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Business applications

\n", " In this exercise we extended the Day 1 code to make multiple LLM calls, and generate a document.\n", "\n", "This is perhaps the first example of Agentic AI design patterns, as we combined multiple calls to LLMs. This will feature more in Week 2, and then we will return to Agentic AI in a big way in Week 8 when we build a fully autonomous Agent solution.\n", "\n", "Generating content in this way is one of the very most common Use Cases. As with summarization, this can be applied to any business vertical. Write marketing content, generate a product tutorial from a spec, create personalized email content, and so much more. Explore how you can apply content generation to your business, and try making yourself a proof-of-concept prototype. See what other students have done in the community-contributions folder -- so many valuable projects -- it's wild!\n", "
" ] }, { "cell_type": "markdown", "id": "14b2454b-8ef8-4b5c-b928-053a15e0d553", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Before you move to Week 2 (which is tons of fun)

\n", " Please see the week1 EXERCISE notebook for your challenge for the end of week 1. This will give you some essential practice working with Frontier APIs, and prepare you well for Week 2.\n", "
" ] }, { "cell_type": "markdown", "id": "17b64f0f-7d33-4493-985a-033d06e8db08", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

A reminder on 3 useful resources

\n", " 1. The resources for the course are available here.
\n", " 2. I'm on LinkedIn here and I love connecting with people taking the course!
\n", " 3. I'm trying out X/Twitter and I'm at @edwarddonner and hoping people will teach me how it's done.. \n", "
\n", "
" ] }, { "cell_type": "markdown", "id": "6f48e42e-fa7a-495f-a5d4-26bfc24d60b6", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Finally! I have a special request for you

\n", " \n", " My editor tells me that it makes a MASSIVE difference when students rate this course on Udemy - it's one of the main ways that Udemy decides whether to show it to others. If you're able to take a minute to rate this, I'd be so very grateful! And regardless - always please reach out to me at ed@edwarddonner.com if I can help at any point.\n", " \n", "
" ] }, { "cell_type": "code", "execution_count": null, "id": "b8d3e1a1-ba54-4907-97c5-30f89a24775b", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.2" } }, "nbformat": 4, "nbformat_minor": 5 }