/TalkToData

Primary LanguagePython

title emoji colorFrom colorTo sdk sdk_version app_file pinned license
Talk To Data
🐠
blue
pink
streamlit
1.27.2
app.py
false
apache-2.0

Talk to Your Data

Overview

This code provides a simple chat interface that uses OpenAI's GPT-3.5-Turbo to answer questions related to a document.

Features

  • Upload Documents: Users can upload PDF or text files.
  • Conversational Interface: Engage in a chat-like conversation with the AI.
  • Real-time Messages: Messages from the user and AI are displayed in real-time.

Usage

  1. Set your OpenAI API key in a .env file.
OPENAI_API_KEY=sk-...
  1. Install the dependencies.
pip install -r requirements.txt
  1. Run the app using
streamlit run chat.py
  1. Upload a document through the app's sidebar.
  2. Start a conversation with the AI by sending a message.

Deploy to Hugging Face Spaces

To deploy your chatbot to Hugging Face Space, first create a new streamlit space and copy the repo url to create a new remote repo with the name huggingface.

huggingface-cli login
git remote add huggingface https://huggingface.co/spaces/qmaruf/talk-to-data

Once done, you can push your code to Hugging Face and GitHub using

git push huggingface main
git push origin main

Don't forget to name your application file as app.py as mentioned at the top of this file. It also contains the sdk name and version.

Author

Quazi Marufur Rahman | maruf.csdu@gmail.com