![]() |
---|
A Prototype of A Data Analysis Tool for Market Performance |
Here's a step-by-step procedure to get your chatbot-powered data analysis tool running on a local machine:
- Python Installed: Ensure you have Python 3.7+ installed on your machine.
- Install Streamlit: If you haven't already, install Streamlit using pip.
pip install streamlit
-
Clone the Repository or Download the Code:
- If your project is hosted on a version control platform like GitHub, clone the repository.
git clone https://github.com/tettey-exploits/market_analysis_chatbot_IndabaX.git
- Alternatively, download the project files and extract them to your desired location.
- If your project is hosted on a version control platform like GitHub, clone the repository.
-
Navigate to the Project Directory:
- Open a terminal (or command prompt) and navigate to the directory containing your project files.
cd path/to/your/project
- Open a terminal (or command prompt) and navigate to the directory containing your project files.
-
Create a Virtual Environment (Optional but Recommended):
- Create a virtual environment to isolate your project dependencies.
python -m venv myenv
- Activate the virtual environment.
- On Windows:
myenv\Scripts\activate
- On macOS/Linux:
source myenv/bin/activate
- On Windows:
- Create a virtual environment to isolate your project dependencies.
-
Install Required Dependencies:
- Install all required dependencies using pip. If you have a
requirements.txt
file, use it to install dependencies.pip install -r requirements.txt
- Set the environment variable:
- Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of the JSON file that contains your credentials. This variable applies only to your current shell session, so if you open a new session, set the variable again.
Download the file at:
Replace
https://drive.google.com/file/d/1cvBwGpmAljXn6A0urgpm--GEyBBGCZUt/view?usp=sharing
KEY_PATH
with the path of the JSON file that contains your credentials. - Linux or macOS:
export GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH" export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/market_analysis_chatbot_IndabaX/farmnets-try-46d4bbb04e15.json"
- Windows:
- For PowerShell:
$env:GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH" $env:GOOGLE_APPLICATION_CREDENTIALS="C:\Users\virt\Desktop\market_analysis_chatbot_IndabaX\farmnets-try-46d4bbb04e15.json"
- For command prompt:
set GOOGLE_APPLICATION_CREDENTIALS=KEY_PATH set GOOGLE_APPLICATION_CREDENTIALS=C:\\Users\\virt\\Desktop\\market_analysis_chatbot_IndabaX\\farmnets-try-46d4bbb04e15.json
-
Run the Streamlit App:
- Start the Streamlit app using the
streamlit run
command followed by the name of your main Python script (e.g.,main.py
).streamlit run main.py
- Start the Streamlit app using the
-
Access the App in a Web Browser:
- Once the app is running, Streamlit will provide a local URL (typically
http://localhost:8501
). Open this URL in a web browser to access your chatbot-powered data analysis tool.
- Once the app is running, Streamlit will provide a local URL (typically
# Step 1: Clone the repository
git clone https://github.com/tettey-exploits/market_analysis_chatbot_IndabaX.git
# Step 2: Navigate to the project directory
cd path/to/your/project
# Step 3: Create a virtual environment (optional)
python -m venv myenv
source myenv/bin/activate # On macOS/Linux
# myenv\Scripts\activate # On Windows
# Step 4: Install required dependencies
pip install -r requirements.txt
# Step 5: Set the environment variable
export GOOGLE_APPLICATION_CREDENTIALS="farmnets-try-1792e1acf49f.json"
# Step 6: Run the Streamlit app
streamlit run main.py