rchrdgwr commited on
Commit
61e298a
1 Parent(s): 9b0652f
.chainlit/config.toml ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ # Whether to enable telemetry (default: true). No personal data is collected.
3
+ enable_telemetry = true
4
+
5
+ # List of environment variables to be provided by each user to use the app.
6
+ user_env = []
7
+
8
+ # Duration (in seconds) during which the session is saved when the connection is lost
9
+ session_timeout = 3600
10
+
11
+ # Enable third parties caching (e.g LangChain cache)
12
+ cache = false
13
+
14
+ # Follow symlink for asset mount (see https://github.com/Chainlit/chainlit/issues/317)
15
+ # follow_symlink = false
16
+
17
+ [features]
18
+ # Show the prompt playground
19
+ prompt_playground = true
20
+
21
+ # Process and display HTML in messages. This can be a security risk (see https://stackoverflow.com/questions/19603097/why-is-it-dangerous-to-render-user-generated-html-or-javascript)
22
+ unsafe_allow_html = false
23
+
24
+ # Process and display mathematical expressions. This can clash with "$" characters in messages.
25
+ latex = false
26
+
27
+ # Authorize users to upload files with messages
28
+ multi_modal = true
29
+
30
+ # Allows user to use speech to text
31
+ [features.speech_to_text]
32
+ enabled = false
33
+ # See all languages here https://github.com/JamesBrill/react-speech-recognition/blob/HEAD/docs/API.md#language-string
34
+ # language = "en-US"
35
+
36
+ [UI]
37
+ # Name of the app and chatbot.
38
+ name = "Chatbot"
39
+
40
+ # Show the readme while the conversation is empty.
41
+ show_readme_as_default = true
42
+
43
+ # Description of the app and chatbot. This is used for HTML tags.
44
+ # description = ""
45
+
46
+ # Large size content are by default collapsed for a cleaner ui
47
+ default_collapse_content = true
48
+
49
+ # The default value for the expand messages settings.
50
+ default_expand_messages = false
51
+
52
+ # Hide the chain of thought details from the user in the UI.
53
+ hide_cot = false
54
+
55
+ # Link to your github repo. This will add a github button in the UI's header.
56
+ # github = ""
57
+
58
+ # Specify a CSS file that can be used to customize the user interface.
59
+ # The CSS file can be served from the public directory or via an external link.
60
+ # custom_css = "/public/test.css"
61
+ custom_css = "/public/custom_styles.css"
62
+ # Override default MUI light theme. (Check theme.ts)
63
+ [UI.theme.light]
64
+ background = "#E0F7FA" # Light Cyan for a refreshing background
65
+ paper = "#FFFFFF" # Keep the paper white for contrast
66
+
67
+ [UI.theme.light.primary]
68
+ main = "#0288D1" # A vibrant blue as the primary color
69
+ dark = "#01579B" # A deeper blue for darker elements
70
+ light = "#B3E5FC" # A light blue for accents and highlights
71
+ [UI.theme.dark]
72
+ background = "#1E3A5F" # A deep, rich blue for the background
73
+ paper = "#2C3E50" # Slightly lighter for paper elements
74
+
75
+ [UI.theme.dark.primary]
76
+ main = "#0288D1" # Same vibrant blue for consistency
77
+ dark = "#01579B" # A rich dark blue
78
+ light = "#4FC3F7" # A lighter blue for accents
79
+
80
+ [meta]
81
+ generated_by = "0.7.700"
.env.sample ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # !!! DO NOT UPDATE THIS FILE DIRECTLY. MAKE A COPY AND RENAME IT `.env` TO PROCEED !!! #
2
+ HF_LLM_ENDPOINT="YOUR_LLM_ENDPOINT_URL_HERE"
3
+ HF_EMBED_ENDPOINT="YOUR_EMBED_MODEL_ENDPOINT_URL_HERE"
4
+ HF_TOKEN="YOUR_HF_TOKEN_HERE"
5
+ # !!! DO NOT UPDATE THIS FILE DIRECTLY. MAKE A COPY AND RENAME IT `.env` TO PROCEED !!! #
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ .env
2
+ __pycache__/
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,5 @@
 
 
 
 
 
 
1
+ import chainlit as cl
2
+
3
+ @cl.on_message
4
+ def main(message: str):
5
+ return cl.Message(content=f"You said: {message}")
chainlit.md ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ # Chainlit Tutorial
2
+
public/custom_styles.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ .message {
2
+ background-color: #E3F2FD !important; /* Light Blue background */
3
+ color: #1A237E !important; /* Dark Indigo text */
4
+ }
5
+
6
+ .MuiToolbar-root {
7
+ background-color: #b7dcf1 !important; /* Medium Blue background */
8
+ }
requirements copy.txt ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.2.1
2
+ aiohappyeyeballs==2.4.3
3
+ aiohttp==3.10.8
4
+ aiosignal==1.3.1
5
+ annotated-types==0.7.0
6
+ anyio==3.7.1
7
+ async-timeout==4.0.3
8
+ asyncer==0.0.2
9
+ attrs==24.2.0
10
+ bidict==0.23.1
11
+ certifi==2024.8.30
12
+ chainlit==0.7.700
13
+ charset-normalizer==3.3.2
14
+ click==8.1.7
15
+ dataclasses-json==0.5.14
16
+ Deprecated==1.2.14
17
+ distro==1.9.0
18
+ exceptiongroup==1.2.2
19
+ faiss-cpu==1.8.0.post1
20
+ fastapi==0.100.1
21
+ fastapi-socketio==0.0.10
22
+ filelock==3.16.1
23
+ filetype==1.2.0
24
+ frozenlist==1.4.1
25
+ fsspec==2024.9.0
26
+ googleapis-common-protos==1.65.0
27
+ greenlet==3.1.1
28
+ grpcio==1.66.2
29
+ grpcio-tools==1.62.3
30
+ h11==0.14.0
31
+ h2==4.1.0
32
+ hpack==4.0.0
33
+ httpcore==0.17.3
34
+ httpx==0.24.1
35
+ huggingface-hub==0.25.1
36
+ hyperframe==6.0.1
37
+ idna==3.10
38
+ importlib_metadata==8.4.0
39
+ Jinja2==3.1.4
40
+ jiter==0.5.0
41
+ joblib==1.4.2
42
+ jsonpatch==1.33
43
+ jsonpointer==3.0.0
44
+ langchain==0.3.2
45
+ langchain-community==0.3.1
46
+ langchain-core==0.3.8
47
+ langchain-huggingface==0.1.0
48
+ langchain-openai==0.2.0
49
+ langchain-qdrant==0.1.4
50
+ langchain-text-splitters==0.3.0
51
+ # langsmith==0.1.121
52
+ Lazify==0.4.0
53
+ MarkupSafe==2.1.5
54
+ marshmallow==3.22.0
55
+ mpmath==1.3.0
56
+ multidict==6.1.0
57
+ mypy-extensions==1.0.0
58
+ nest-asyncio==1.6.0
59
+ networkx==3.2.1
60
+ numpy==1.26.4
61
+ nvidia-cublas-cu12==12.1.3.1
62
+ nvidia-cuda-cupti-cu12==12.1.105
63
+ nvidia-cuda-nvrtc-cu12==12.1.105
64
+ nvidia-cuda-runtime-cu12==12.1.105
65
+ nvidia-cudnn-cu12==9.1.0.70
66
+ nvidia-cufft-cu12==11.0.2.54
67
+ nvidia-curand-cu12==10.3.2.106
68
+ nvidia-cusolver-cu12==11.4.5.107
69
+ nvidia-cusparse-cu12==12.1.0.106
70
+ nvidia-nccl-cu12==2.20.5
71
+ nvidia-nvjitlink-cu12==12.6.77
72
+ nvidia-nvtx-cu12==12.1.105
73
+ openai==1.51.0
74
+ opentelemetry-api==1.27.0
75
+ opentelemetry-exporter-otlp==1.27.0
76
+ opentelemetry-exporter-otlp-proto-common==1.27.0
77
+ opentelemetry-exporter-otlp-proto-grpc==1.27.0
78
+ opentelemetry-exporter-otlp-proto-http==1.27.0
79
+ opentelemetry-instrumentation==0.48b0
80
+ opentelemetry-proto==1.27.0
81
+ opentelemetry-sdk==1.27.0
82
+ opentelemetry-semantic-conventions==0.48b0
83
+ orjson==3.10.7
84
+ packaging==23.2
85
+ pillow==10.4.0
86
+ portalocker==2.10.1
87
+ protobuf==4.25.5
88
+ pydantic==2.9.2
89
+ pydantic-settings==2.5.2
90
+ pydantic_core==2.23.4
91
+ PyJWT==2.9.0
92
+ PyMuPDF==1.24.10
93
+ PyMuPDFb==1.24.10
94
+ python-dotenv==1.0.1
95
+ python-engineio==4.9.1
96
+ python-graphql-client==0.4.3
97
+ python-multipart==0.0.6
98
+ python-socketio==5.11.4
99
+ PyYAML==6.0.2
100
+ qdrant-client==1.11.2
101
+ regex==2024.9.11
102
+ requests==2.32.3
103
+ safetensors==0.4.5
104
+ scikit-learn==1.5.2
105
+ scipy==1.13.1
106
+ sentence-transformers==3.1.1
107
+ simple-websocket==1.0.0
108
+ sniffio==1.3.1
109
+ SQLAlchemy==2.0.35
110
+ starlette==0.27.0
111
+ sympy==1.13.3
112
+ syncer==2.0.3
113
+ tenacity==8.5.0
114
+ threadpoolctl==3.5.0
115
+ tiktoken==0.7.0
116
+ tokenizers==0.20.0
117
+ tomli==2.0.1
118
+ torch==2.4.1
119
+ tqdm==4.66.5
120
+ transformers==4.45.1
121
+ triton==3.0.0
122
+ typing-inspect==0.9.0
123
+ typing_extensions==4.12.2
124
+ uptrace==1.26.0
125
+ urllib3==2.2.3
126
+ uvicorn==0.23.2
127
+ watchfiles==0.20.0
128
+ websockets==13.1
129
+ wrapt==1.16.0
130
+ wsproto==1.2.0
131
+ yarl==1.13.1
132
+ zipp==3.20.2
requirements.txt ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.2.1
2
+ aiohappyeyeballs==2.4.3
3
+ aiohttp==3.10.8
4
+ aiosignal==1.3.1
5
+ annotated-types==0.7.0
6
+ anyio==3.7.1
7
+ async-timeout==4.0.3
8
+ asyncer==0.0.2
9
+ attrs==24.2.0
10
+ bidict==0.23.1
11
+ certifi==2024.8.30
12
+ chainlit==0.7.700
13
+ charset-normalizer==3.3.2
14
+ click==8.1.7
15
+ dataclasses-json==0.5.14
16
+ Deprecated==1.2.14
17
+ distro==1.9.0
18
+ exceptiongroup==1.2.2
19
+ faiss-cpu==1.8.0.post1
20
+ fastapi==0.100.1
21
+ fastapi-socketio==0.0.10
22
+ filelock==3.16.1
23
+ filetype==1.2.0
24
+ frozenlist==1.4.1
25
+ fsspec==2024.9.0
26
+ googleapis-common-protos==1.65.0
27
+ greenlet==3.1.1
28
+ grpcio==1.66.2
29
+ grpcio-tools==1.62.3
30
+ h11==0.14.0
31
+ h2==4.1.0
32
+ hpack==4.0.0
33
+ httpcore==0.17.3
34
+ httpx==0.24.1
35
+ huggingface-hub==0.25.1
36
+ hyperframe==6.0.1
37
+ idna==3.10
38
+ importlib_metadata==8.4.0
39
+ Jinja2==3.1.4
40
+ jiter==0.5.0
41
+ joblib==1.4.2
42
+ jsonpatch==1.33
43
+ jsonpointer==3.0.0
44
+ Lazify==0.4.0
45
+ MarkupSafe==2.1.5
46
+ marshmallow==3.22.0
47
+ mpmath==1.3.0
48
+ multidict==6.1.0
49
+ mypy-extensions==1.0.0
50
+ nest-asyncio==1.6.0
51
+ networkx==3.2.1
52
+ numpy==1.26.4
53
+ openai==1.51.0
54
+
55
+ orjson==3.10.7
56
+ packaging==23.2
57
+ pillow==10.4.0
58
+ portalocker==2.10.1
59
+ protobuf==4.25.5
60
+ pydantic==2.9.2
61
+ pydantic-settings==2.5.2
62
+ pydantic_core==2.23.4
63
+ PyJWT==2.9.0
64
+ PyMuPDF==1.24.10
65
+ PyMuPDFb==1.24.10
66
+ python-dotenv==1.0.1
67
+ python-engineio==4.9.1
68
+ python-graphql-client==0.4.3
69
+ python-multipart==0.0.6
70
+ python-socketio==5.11.4
71
+ PyYAML==6.0.2
72
+ qdrant-client==1.11.2
73
+ regex==2024.9.11
74
+ requests==2.32.3
75
+ safetensors==0.4.5
76
+ scikit-learn==1.5.2
77
+ scipy==1.13.1
78
+ sentence-transformers==3.1.1
79
+ simple-websocket==1.0.0
80
+ sniffio==1.3.1
81
+ SQLAlchemy==2.0.35
82
+ starlette==0.27.0
83
+ sympy==1.13.3
84
+ syncer==2.0.3
85
+ tenacity==8.5.0
86
+ threadpoolctl==3.5.0
87
+ tiktoken==0.7.0
88
+ tokenizers==0.20.0
89
+ tomli==2.0.1
90
+ torch==2.4.1
91
+ tqdm==4.66.5
92
+ transformers==4.45.1
93
+ triton==3.0.0
94
+ typing-inspect==0.9.0
95
+ typing_extensions==4.12.2
96
+ uptrace==1.26.0
97
+ urllib3==2.2.3
98
+ uvicorn==0.23.2
99
+ watchfiles==0.20.0
100
+ websockets==13.1
101
+ wrapt==1.16.0
102
+ wsproto==1.2.0
103
+ yarl==1.13.1
104
+ zipp==3.20.2