https://github.com/huggingface/chat-ui Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} huggingface / chat-ui Public * Notifications * Fork 20 * Star 440 Open source codebase powering the HuggingChat app huggingface.co/chat License Apache-2.0 license 440 stars 20 forks Star Notifications * Code * Issues 18 * Pull requests 5 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights huggingface/chat-ui This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 16 branches 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/h] Use Git or checkout with SVN using the web URL. [gh repo clone huggin] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @julien-c julien-c Release as a GitHub repo (#195) ... 0fe4fa3 May 11, 2023 Release as a GitHub repo (#195) * Update PRIVACY.md * Update README.md * mention SvelteKit in the readme * Add banner 0fe4fa3 Git stats * 249 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows .vscode src static .env .eslintignore .eslintrc.cjs .gitignore .npmrc .prettierignore .prettierrc Dockerfile LICENSE PRIVACY.md README.md package-lock.json package.json postcss.config.js svelte.config.js tailwind.config.cjs tsconfig.json vite.config.ts View code Chat UI Launch Environment Duplicating to a Space Running Local Inference Building README.md title emoji colorFrom colorTo sdk pinned license base_path app_port chat-ui purple purple docker false apache-2.0 /chat 3000 Chat UI Chat UI repository thumbnail A chat interface using open source models, eg OpenAssistant. It is a SvelteKit app and it powers the HuggingChat app on hf.co/chat. Launch npm install npm run dev Environment Default configuration is in .env. Put custom config and secrets in .env.local, it will override the values in .env. Check out .env to see what needs to be set. Basically you need to create a .env.local with the following contents: MONGODB_URL= HF_ACCESS_TOKEN= Duplicating to a Space Create a DOTENV_LOCAL secret to your space with the following contents: MONGODB_URL= HF_ACCESS_TOKEN= Where the contents in <...> are replaced by the MongoDB URL and your HF Access Token. Running Local Inference Both the example above use the HF Inference API or HF Endpoints API. If you want to run the model locally, you need to run this inference server locally: https://github.com/huggingface/ text-generation-inference And add this to your .env.local: MODELS=`[{"name": "...", "endpoints": [{"url": "127.0.0.1:8080/generate_stream"}]}]` Building To create a production version of your app: npm run build You can preview the production build with npm run preview. To deploy your app, you may need to install an adapter for your target environment. About Open source codebase powering the HuggingChat app huggingface.co/chat Topics huggingface sveltekit chatgpt Resources Readme License Apache-2.0 license Stars 440 stars Watchers 37 watching Forks 20 forks Report repository Releases No releases published Packages 0 No packages published Contributors 10 * @coyotte508 * @gary149 * @Grsmto * @julien-c * @osanseviero * @Pierrci * @OlivierDehaene * @nsarrazin * @loubnabnl * @Reeray Languages * Svelte 54.2% * TypeScript 40.5% * HTML 2.3% * JavaScript 2.1% * Other 0.9% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.