Benjamona97 commited on
Commit
24ad92c
1 Parent(s): 264dae3

Third commit

Browse files
Files changed (5) hide show
  1. .gitignore +1 -1
  2. Dockerfile +17 -0
  3. app.py +1 -1
  4. fund.xml +0 -0
  5. requirements.txt +1 -0
.gitignore CHANGED
@@ -2,7 +2,7 @@
2
  __pycache__/
3
  *.py[cod]
4
  *$py.class
5
-
6
  # C extensions
7
  *.so
8
 
 
2
  __pycache__/
3
  *.py[cod]
4
  *$py.class
5
+ .env
6
  # C extensions
7
  *.so
8
 
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+
9
+ # Copy your application code
10
+ COPY . .
11
+
12
+ # Create a non-root user, change ownership of /code to this user, then switch to it
13
+ RUN adduser --disabled-password --gecos '' myuser && \
14
+ chown -R myuser:myuser /code
15
+ USER myuser
16
+
17
+ CMD ["chainlit", "run", "app.py", "--port", "7860"]
app.py CHANGED
@@ -7,7 +7,7 @@ from typing import Any
7
  from chainlit.playground.providers.openai import stringify_function_call
8
  import chainlit as cl
9
 
10
- client = AsyncOpenAI(api_key="sk-proj-kgvgv5JszveWc9Lg3L4KT3BlbkFJToGaRTwPf9gptNm1n3sY")
11
 
12
  MAX_ITER = 10
13
 
 
7
  from chainlit.playground.providers.openai import stringify_function_call
8
  import chainlit as cl
9
 
10
+ client = AsyncOpenAI(api_key=cl.user_session.get("openai_api_key"))
11
 
12
  MAX_ITER = 10
13
 
fund.xml DELETED
The diff for this file is too large to render. See raw diff
 
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  edgartools
2
  chainlit
3
  openai
 
 
1
  edgartools
2
  chainlit
3
  openai
4
+ python-dotenv