Skip to content

Commit

Permalink
pandasai openai working
Browse files Browse the repository at this point in the history
  • Loading branch information
JAlcocerT committed Jul 23, 2024
1 parent 5f28fad commit 1439a56
Show file tree
Hide file tree
Showing 8 changed files with 582 additions and 518 deletions.
2 changes: 1 addition & 1 deletion LangChain/Groq/langchain-groq-llama3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from langchain_groq import ChatGroq

## export GROQ_API_KEY="sk-..." #linux
## $Env:GROQ_API_KEY = "sk-..." #PS
## export OPENAI_API_KEY="sk-..." #PS

#https://python.langchain.com/v0.2/docs/concepts/#chat-models
chat = ChatGroq(
Expand Down
2 changes: 1 addition & 1 deletion PandasAI/GroqAPI/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10.14-slim
FROM python:3.10.12
# https://hub.docker.com/_/python

# LABEL org.opencontainers.image.source https://github.com/JAlcocerT/Streamlit-MultiChat
Expand Down
3 changes: 2 additions & 1 deletion PandasAI/GroqAPI/PandasAI_groq.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
load_dotenv(override=True)


data = pd.read_csv("population.csv")
#data = pd.read_csv("population.csv")
data = pd.read_csv("https://github.com/TirendazAcademy/PandasAI-Tutorials/blob/main/Datasets/population.csv")
data.head()


Expand Down
2 changes: 1 addition & 1 deletion PandasAI/GroqAPI/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pandasai==2.0 #https://pypi.org/project/pandasai/2.0/
langchain-groq==0.0.1 #https://pypi.org/project/langchain/0.1.9/
pandas
#pandas

#streamlit

Expand Down
56 changes: 55 additions & 1 deletion PandasAI/OpenAI/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,55 @@
FROM python:3.10.12
FROM python:3.10.12
#https://hub.docker.com/_/python

# LABEL org.opencontainers.image.source https://github.com/JAlcocerT/Streamlit-MultiChat
# LABEL maintainer="Jesus Alcocer Tagua"

# Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME

RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
nano \
g++
# \
# && rm -rf /var/lib/apt/lists/*

# Install Miniconda
# RUN curl -Lo miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
# && sh miniconda.sh -b -p /miniconda \
# && rm miniconda.sh

# ENV PATH=/miniconda/bin:${PATH}

COPY . ./

# Install production dependencies.
RUN pip install -r requirements.txt

EXPOSE 8501

# docker build -t py_test_310 .
# podman build -t py_test_310 .


#docker exec -it py_3_10 /bin/bash
#podman exec -it py_3_10 /bin/bash

export GROQ_API_KEY=
export GROQ_API_KEY=

# version: '3.8'

# services:
# my_python_dev_container:
# image: py_test_310 #python:3.10
# container_name: py_3_10
# ports:
# - "8701:8501"
# working_dir: /app
# #command: python3 app.py
# command: tail -f /dev/null #keep it running
Loading

0 comments on commit 1439a56

Please sign in to comment.