Coder Social home page Coder Social logo

artmiss-gns / chatbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3 KB

This project demonstrates building a conversational chatbot web application with Streamlit and the LLama language model. It provides a simple interface for natural conversations with LLama, running locally via the Ollama.

License: MIT License

Python 100.00%

chatbot's Introduction

chatbot

This repository contains a Python chatbot project with a Streamlit web interface for conversations. It allows you to interact with conversational AI models like LLama through an easy-to-use chat UI.

Overview

  • streamlit_app.py - Streamlit web application providing chatbot UI
  • src/model_interaction.py - Python module for calling LLama via Ollama
  • Uses Ollama (allows you to run open-source large language models, such as Llama 2, locally)
  • LLama server runs locally to power chatbot conversations

Getting Started

Prerequisites

  • Python 3.7+
  • Ollama
  • LLama model installed and running locally through Ollama
  • Streamlit
pip install streamlit

to install Ollama, check their github page for installation instructions
Ollama github page

Usage

  1. Start LLama server with Ollama
ollama run llama2

instead of llama2, you can put any other supported models by Ollama.

  1. Run Streamlit app
streamlit run app.py
  1. Chat with the bot at http://localhost:8501!

Code Overview

model_interaction.py

  • Makes API calls to localhost Ollama server
  • Handles LLama response payload

streamlit_app.py

  • Initializes Streamlit app
  • Manages chat message state in session_state
  • Displays chat UI using Streamlit components
  • Calls model_interaction to get bot responses
  • Displays bot messages and responses

chatbot's People

Contributors

artmiss-gns avatar

Watchers

Kostas Georgiou avatar  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.