Coder Social home page Coder Social logo

dbx_llm_app's Introduction

Dash Chat Interface for Databricks Models

This project provides a web-based interface for interacting with machine learning models served on Databricks, featuring functionalities to register new Hugging Face models, chat with these models, and view chat history. Built with Dash and leveraging Databricks for model serving, it offers a user-friendly platform for experimenting with and deploying machine learning models.

Features

  • Model Registration: Easily register new Hugging Face models with Databricks and create serving endpoints directly from the interface.
  • Chat Interface: Engage in conversations with the registered models served on Databricks, providing a seamless chatting experience.
  • Chat History: View the history of your interactions with the models, allowing for review and analysis of past conversations.

Getting Started

Prerequisites

In order to run this app, you will need to make sure you have the following items:

  • Python 3.10 or later
  • Databricks account
  • Hugging Face models (for registration)

Databricks-specific items:

  • A Databricks workspace with Unity Catalog enabled This workspace is where you'll be pulling models from Hugging Face, logging them, and deploying them. It's essential that your account has the permissions needed to create clusters, jobs, and manage models.
  • A personal access token to authenticate with Databricks SDK workspace client
  • A Python development environment running Python3.10 Having a functional development environment for Plotly Dash is crucial. Dash is a Python framework for building data applications. Follow the instructions in this project’s README.md file on Github (link) in order to deploy this project’s Dash app. If you are looking for a quickstart guide to Dash, check out our Dash in 20 minutes tutorial here.

*** In addition, the user whose personal access token you choose to use must have CREATE MODEL permissions enabled. (see below) ***

Screenshot 2024-03-11 at 10 02 30 AM

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/yourgithubusername/yourrepositoryname.git
  1. Navigate to the cloned directory:

cd dashdbxhf

  1. Install the required Python dependencies:

pip install -r requirements.txt

  1. Set up your environment variables by creating a .env file in the root directory and adding your Databricks token and host:
DATABRICKS_TOKEN=your_databricks_token
DATABRICKS_HOST=https://your-databricks-workspace-url

Running the Application

  1. Start the Dash application:

python app.py

  1. Open a web browser and navigate to http://localhost:8050/ to access the application.

Usage

Registering New Models

  • Navigate to the "Register New Models" tab.
  • Fill in the form with the Hugging Face model name, a registered name for your model, maximum tokens for inference, and the default temperature.
  • Click "Register Model with Databricks and Create Serving Endpoint" to complete the registration.

Chatting with Models

  • Go to the "Chat Interface" tab.
  • Select a model from the "Select Endpoint" dropdown.
  • Enter your message in the text area and click "Submit Text" to send.
  • The model's response will appear in the chat interface.

Viewing Chat History

  • Switch to the "Chat History" tab to view the history of your conversations.

Contributing

Contributions to improve the project are welcome. Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch for your feature (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a pull request.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Sachin- [email protected]

dbx_llm_app's People

Contributors

sachds avatar calreynolds avatar

Stargazers

jmauro avatar Karan M avatar M. Affaneh avatar  avatar

Watchers

Mark Ledsome avatar Antoine Roy-Gobeil avatar Ben Postlethwaite avatar Chris Parmer avatar Tarun Gaba avatar x3rus (Thomas Boutry) avatar  avatar

Forkers

brainlabz

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.