Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mcarboni/readmemacos #98

Merged
merged 9 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions labs/Lab_Data_Analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ You can use an existing SQL database or the default SQLlite embedded database (*

- [Python](https://www.python.org/ftp/python/3.11.5/python-3.11.5-amd64.exe).

- [Python-MacOS](https://www.python.org/ftp/python/3.11.5/python-3.11.5-macos11.pkg)

> [!IMPORTANT]
> Python and the pip package manager must be in the path in ``Windows`` for the setup scripts to work.
> Python and the pip package manager must be in the path in ``Windows`` for the setup scripts to work.
> If installing on MacOS using the link above, use ``python3`` command on terminal instead of ``python``

- **While installating Python 3.11.5, please make sure to select ```Add python.exe to PATH```**

Expand Down Expand Up @@ -116,13 +119,34 @@ From the terminal, navigate to ```cd OpenAIWorkshop/labs/Lab_Data_Analytics```

### Step 3.1 Create a python environment

**This step will create a python enviorment in your workstation**
**This step will create a python enviroment in your workstation**

- For Windows, execute the following command:
- ```python manage.py new```
- For Mac or Ubuntu, execute the following command:
- For MacOS or Ubuntu, execute the following command:
- ```python3 manage.py new```

> [!NOTE]
> You can verify whether ```python``` or ```python3``` is the correct shortcut by executing <br>
> - ```python --version``` or ```python3 --versions```

### OPTIONAL - Step 3.2 Install required libraries
> [!WARNING]
> Only run this step if you don't see the packages being downloaded/installed on the terminal. <br>
> `Installing collected packages: pytz, zipp, ...`

**This step will install the required libraries in your virtual environment**
- For Windows, execute the following command, within the context of your virtual environment
- `pip install -r requirements.txt`
- For MacOS, execute the following command, within the context of your virtual environment
- `pip3 install -r requirements.txt`

> [!IMPORTANT]
> Ensure you're running pip install from the context of your virtual environment.
> To do so run the following from the `Lab_Data_Analytics` folder: <br>
> Windows: `.\aoaivenv\Scripts\activate` <br>
> MacOS: `source aoaivenv/bin/activate` <br>

### Step 3.4 Run the application locally

To run the application from the command line: `streamlit run app.py`
Expand Down
9 changes: 8 additions & 1 deletion labs/Lab_Data_Analytics/TSHOOT.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ This is similar to the scenario above, in that the `PATH` needs to be adjusted t

* Confirm the fix by displaying streamlit help:

![Streamlit Help](./Images/streamlit-verify.PNG)
![Streamlit Help](./Images/streamlit-verify.PNG)

## MacOS Virtual Environment not activating
If you are not seeing `(aoaivenv) ➜ Lab_Data_Analytics` or simillar after running `python manage.py new` or `python manage.py activate`, the virtual environment is not being activated and running `streamlit` will result in the command not being found.

### Workaround
From within the `Lab_Data_Analytics` folder, ensure the `aoaivenv` has been created by `python manage.py new` and run:
* `source aoaivenv/bin/activate`
4 changes: 2 additions & 2 deletions labs/Lab_Data_Analytics/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ def toggleSettings():
"Which products have most seasonality in sales quantity in 2016?",
"Which customers are most likely to churn?",
"What is the impact of discount on sales? What's optimal discount rate?",
"Predict monthly revenue for next 6 months starting from June-2018. Do not use Prophet. Show the prediction in a chart together with historical data for comparison."
"Predict monthly revenue for next 6 months starting from 06-2018. Do not use Prophet. Show the prediction in a chart together with historical data for comparison."

],
"GPT-4": [
"Predict monthly revenue for next 6 months starting from June-2018. Do not use Prophet. Show the prediction in a chart together with historical data for comparison.",
"Predict monthly revenue for next 6 months starting from 06-2018. Do not use Prophet. Show the prediction in a chart together with historical data for comparison.",
"What is the impact of discount on sales? What's optimal discount rate?" ,
]
}
Expand Down