Forchapeatl/baseballWiki

★ 0Forks 0HTMLGitHub ↗Compare

README

Here’s a README.md for your Baseball Wiki project with installation instructions:

Set up a Virtual Environment

python3 -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`

Install Dependencies

pip install -r requirements.txt

Set Google Cloud Credentials

Make sure you have the Google Cloud credentials set:

export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/google-credentials.json"

Or include directly in app.py

os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "../mlbasket-f43c872cf2fb.json"

Set up FAISS and LangChain

  1. Ensure you have FAISS installed by following the official instructions from FAISS documentation.
  2. Set up LangChain:
pip install langchain langchain-google

Start Flask Server

python app.py

The Flask server should now be running locally. Open your browser and go to http://127.0.0.1:5000 to interact with the app.

Usage

  1. Go to the Baseball Wiki app.
  2. Click on a player card and then click "Chat with Bot".
  3. Ask questions like: "What is Shohei Ohtani’s batting average?" and the chatbot will respond with relevant player data.

Contributing

Feel free to fork the repository, make improvements, and create pull requests. If you have any suggestions or find bugs, please open an issue.

License

This project is licensed under the MIT License - see the MIT LICENSE file for details.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributors

Forchapeatl

Issues