Giter Site home page Giter Site logo

digitaljerrygit / chat-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from huggingface/chat-ui

0.0 0.0 0.0 347 KB

Open source codebase powering the HuggingChat app

Home Page: https://huggingface.co/chat

License: Apache License 2.0

JavaScript 2.11% TypeScript 40.53% CSS 0.59% HTML 2.30% Dockerfile 0.34% Svelte 54.13%

chat-ui's Introduction

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=<url to mongo, for example a free MongoDB Atlas sandbox instance>
HF_ACCESS_TOKEN=<your HF access token from https://huggingface.co/settings/tokens>

Duplicating to a Space

Create a DOTENV_LOCAL secret to your space with the following contents:

MONGODB_URL=<url to mongo, for example a free MongoDB Atlas sandbox instance>
HF_ACCESS_TOKEN=<your HF access token from https://huggingface.co/settings/tokens>

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.

chat-ui's People

Contributors

coyotte508 avatar grsmto avatar gary149 avatar julien-c avatar osanseviero avatar reeray avatar loubnabnl avatar nsarrazin avatar pierrci avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.