Kian So
commited on
Commit
·
63d9e8b
1
Parent(s):
fcb27d4
initial
Browse files- .gitignore +0 -0
- Dockerfile +11 -0
- app.py +10 -0
- requirements.txt +68 -0
.gitignore
ADDED
File without changes
|
Dockerfile
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9
|
2 |
+
RUN useradd -m -u 1000 user
|
3 |
+
USER user
|
4 |
+
ENV HOME=/home/user \
|
5 |
+
PATH=/home/user/.local/bin:$PATH
|
6 |
+
WORKDIR $HOME/app
|
7 |
+
COPY --chown=user . $HOME/app
|
8 |
+
COPY ./requirements.txt ~/app/requirements.txt
|
9 |
+
RUN pip install -r requirements.txt
|
10 |
+
COPY . .
|
11 |
+
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import chainlit as cl
|
2 |
+
|
3 |
+
|
4 |
+
@cl.on_message # this function will be called every time a user inputs a message in the UI
|
5 |
+
async def main(message: str):
|
6 |
+
# this is an intermediate step
|
7 |
+
# await cl.Message(author="Tool 1", content=f"Response from tool1", indent=1).send()
|
8 |
+
|
9 |
+
# send back the final answer
|
10 |
+
await cl.Message(content=f"This is the final answer").send()
|
requirements.txt
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
aiofiles==23.1.0
|
2 |
+
aiohttp==3.8.4
|
3 |
+
aiosignal==1.3.1
|
4 |
+
anyio==3.7.0
|
5 |
+
async-timeout==4.0.2
|
6 |
+
asyncer==0.0.2
|
7 |
+
attrs==23.1.0
|
8 |
+
auth0-python==4.2.0
|
9 |
+
backoff==2.2.1
|
10 |
+
bidict==0.22.1
|
11 |
+
certifi==2023.5.7
|
12 |
+
cffi==1.15.1
|
13 |
+
chainlit==0.3.0
|
14 |
+
charset-normalizer==3.1.0
|
15 |
+
click==8.1.3
|
16 |
+
colorama==0.4.6
|
17 |
+
cryptography==41.0.1
|
18 |
+
dataclasses-json==0.5.8
|
19 |
+
Deprecated==1.2.14
|
20 |
+
exceptiongroup==1.1.1
|
21 |
+
fastapi==0.96.1
|
22 |
+
fastapi-socketio==0.0.10
|
23 |
+
frozenlist==1.3.3
|
24 |
+
googleapis-common-protos==1.59.1
|
25 |
+
grpcio==1.54.2
|
26 |
+
h11==0.14.0
|
27 |
+
idna==3.4
|
28 |
+
importlib-metadata==6.0.1
|
29 |
+
marshmallow==3.19.0
|
30 |
+
marshmallow-enum==1.5.1
|
31 |
+
multidict==6.0.4
|
32 |
+
mypy-extensions==1.0.0
|
33 |
+
nest-asyncio==1.5.6
|
34 |
+
openai==0.27.8
|
35 |
+
opentelemetry-api==1.18.0
|
36 |
+
opentelemetry-exporter-otlp==1.18.0
|
37 |
+
opentelemetry-exporter-otlp-proto-common==1.18.0
|
38 |
+
opentelemetry-exporter-otlp-proto-grpc==1.18.0
|
39 |
+
opentelemetry-exporter-otlp-proto-http==1.18.0
|
40 |
+
opentelemetry-instrumentation==0.39b0
|
41 |
+
opentelemetry-proto==1.18.0
|
42 |
+
opentelemetry-sdk==1.18.0
|
43 |
+
opentelemetry-semantic-conventions==0.39b0
|
44 |
+
packaging==23.1
|
45 |
+
protobuf==4.23.2
|
46 |
+
pycparser==2.21
|
47 |
+
pydantic==1.10.9
|
48 |
+
PyJWT==2.7.0
|
49 |
+
python-dotenv==1.0.0
|
50 |
+
python-engineio==4.4.1
|
51 |
+
python-graphql-client==0.4.3
|
52 |
+
python-socketio==5.8.0
|
53 |
+
requests==2.31.0
|
54 |
+
sniffio==1.3.0
|
55 |
+
starlette==0.27.0
|
56 |
+
syncer==2.0.3
|
57 |
+
tomli==2.0.1
|
58 |
+
tqdm==4.65.0
|
59 |
+
typing-inspect==0.9.0
|
60 |
+
typing_extensions==4.6.3
|
61 |
+
uptrace==1.18.0
|
62 |
+
urllib3==2.0.3
|
63 |
+
uvicorn==0.22.0
|
64 |
+
watchfiles==0.19.0
|
65 |
+
websockets==11.0.3
|
66 |
+
wrapt==1.15.0
|
67 |
+
yarl==1.9.2
|
68 |
+
zipp==3.15.0
|