This readme file provides instructions for running the Streamlit app "Stream Chat" and highlights the steps required to set up the application environment. Please follow the guidelines below to get the app up and running on your local machine.
Before running the Streamlit app, ensure you have the following components installed:
- Python 3.6 or later
- pip (Python package manager)
- Clone the repository:
git clone https://github.com/zshancs/stream-chat.git
cd stream-chat
- Create a virtual environment (optional but recommended):
# On macOS and Linux
python3 -m venv venv
# On Windows
python -m venv venv
- Activate the virtual environment:
# On macOS and Linux
source venv/bin/activate
# On Windows
venv\Scripts\activate
- Install required dependencies:
pip install -r requirements.txt
The Streamlit app relies on a secret named OPENAI_API_KEY
, which is required for authentication purposes. Before running the app, you need to set this environment variable. In the .streamlit/secrets.toml file add:
OPENAI_API_KEY=your_openai_api_key
Replace your_openai_api_key
with the actual API key provided by OpenAI.
Once you have completed the setup and set the OPENAI_API_KEY
environment variable, you can run the Streamlit app:
streamlit run main.py
This will start the app, and you should be able to access it by opening your web browser and navigating to the provided URL (usually http://localhost:8501
).
- The Streamlit app is configured to use the
OPENAI_API_KEY
environment variable for security purposes. Please ensure that you keep this key confidential and avoid sharing it with others.
Enjoy using "Stream Chat" with Streamlit! If you have any feedback or suggestions, we'd love to hear from you: email at mahmad.zeeshan72@gmail.com . "# stream-chat"