phillip1029 commited on
Commit
8e651c3
·
1 Parent(s): 3613bc5

add Dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +17 -0
  2. streamlit_app.py +2 -1
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a base image
2
+ FROM python:3.12-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /usr/src/app
6
+
7
+ # Copy the requirements file into the container at /usr/src/app
8
+ COPY requirements.txt ./
9
+
10
+ # Install any dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy the rest of your app's source code from your host to your image filesystem.
14
+ COPY . .
15
+
16
+ # Run the Streamlit app
17
+ CMD ["streamlit", "run", "streamlit_app.py"]
streamlit_app.py CHANGED
@@ -4,7 +4,8 @@ from pandasai import SmartDataframe
4
  from pandasai.llm import OpenAI
5
  import pandas as pd
6
  import os
7
- from typing_extensions import TypedDict
 
8
 
9
  # load the .env file
10
  from dotenv import load_dotenv
 
4
  from pandasai.llm import OpenAI
5
  import pandas as pd
6
  import os
7
+ from typing import TypedDict
8
+
9
 
10
  # load the .env file
11
  from dotenv import load_dotenv