{ "cells": [ { "cell_type": "markdown", "id": "8ec2fef2", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Prototyping a Basic Chatbot UI\n", "* **Created by:** Eric Martinez\n", "* **For:** Software Engineering 2\n", "* **At:** University of Texas Rio-Grande Valley" ] }, { "cell_type": "markdown", "id": "e989bbe3", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Tools and Concepts" ] }, { "cell_type": "markdown", "id": "9f764b43", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "#### Jupyter Notebook\n", "Jupyter is a great tool for writing and interacting with code. It lets you embed code and text to write and document code exploration.\n", "\n", "It is a great tool for prototyping and rapid development on top of being a great way to distribute understandable code to others.\n", "\n", "In many areas, such as machine learning and data science, it is extremely common for developers to spend most of their time in a notebook environment." ] }, { "cell_type": "code", "execution_count": null, "id": "3ed3e93b", "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "!pip install jupyter-notebook" ] }, { "cell_type": "markdown", "id": "368cda1a", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "#### Gradio\n", "\n", "Gradio is an open-source Python library that allows developers to create and prototype user interfaces (UIs) and APIs for machine learning applications and LLMs quickly and easily. Three reasons it is a great tool are:\n", "\n", "* Simple and intuitive: Gradio makes it easy to create UIs with minimal code, allowing developers to focus on their models.\n", "* Versatile: Gradio supports a wide range of input and output types, making it suitable for various machine learning tasks.\n", "* Shareable: Gradio interfaces can be shared with others, enabling collaboration and easy access to your models." ] }, { "cell_type": "markdown", "id": "e2888a24", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "#### Chatbots\n", "\n", "Chatbots are AI-powered conversational agents designed to interact with users through natural language. LLMs have the potential to revolutionize chatbots by providing more human-like, accurate, and context-aware responses, leading to more engaging and useful interactions." ] }, { "cell_type": "markdown", "id": "6f24bac1", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "#### Example: Gradio Interface\n" ] }, { "cell_type": "code", "execution_count": null, "id": "4ecdb50a", "metadata": { "slideshow": { "slide_type": "fragment" } }, "outputs": [], "source": [ "!pip -q install --upgrade gradio" ] }, { "cell_type": "code", "execution_count": 3, "id": "0b28a4e7", "metadata": { "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Running on local URL: http://127.0.0.1:7882\n", "Running on public URL: https://d807b00726b10425a4.gradio.live\n", "\n", "This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n" ] }, { "data": { "text/html": [ "
" ], "text/plain": [ "