saswatdas123 commited on
Commit
f2302df
Β·
verified Β·
1 Parent(s): 444708f

Upload 5 files

Browse files
Files changed (5) hide show
  1. Dockerfile +27 -0
  2. LICENSE +21 -0
  3. Utilities.py +13 -0
  4. requirements.txt +168 -0
  5. welcome.py +35 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # pull python base image
2
+ FROM python:3.10
3
+
4
+ # specify working directory
5
+ #WORKDIR
6
+
7
+ ADD /requirements.txt .
8
+ ADD /*.* .
9
+ ADD /*.txt .
10
+ ADD /pages/* ./pages/
11
+
12
+ # update pip
13
+ RUN pip install --upgrade pip
14
+
15
+ # install dependencies
16
+ RUN pip install -r requirements.txt
17
+
18
+ #RUN rm *.whl
19
+
20
+ # copy application files
21
+ #ADD /heart_model/* ./app/
22
+
23
+ # expose port for application
24
+ EXPOSE 8001
25
+
26
+ # start fastapi application
27
+ ENTRYPOINT ["streamlit", "run", "welcome.py", "--server.port=8001", "--server.address=0.0.0.0"]
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2024 AI Anytime
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
Utilities.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import sys,yaml
3
+ filepath = "tokens.yaml"
4
+
5
+ # Read the config file to get tokens/API keys
6
+ def get_tokens():
7
+ tokendict={}
8
+
9
+ with open(filepath,'r') as file:
10
+ tokendict = yaml.safe_load(file)
11
+ #print(tokendict)
12
+
13
+ return tokendict
requirements.txt ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiohttp==3.9.3
2
+ aiosignal==1.3.1
3
+ annotated-types==0.6.0
4
+ antlr4-python3-runtime==4.9.3
5
+ anyio==4.3.0
6
+ async-timeout==4.0.3
7
+ attrs==23.2.0
8
+ backoff==2.2.1
9
+ beautifulsoup4==4.12.3
10
+ certifi==2024.2.2
11
+ cffi==1.16.0
12
+ chardet==5.2.0
13
+ charset-normalizer==3.3.2
14
+ click==8.1.7
15
+ colorama==0.4.6
16
+ coloredlogs==15.0.1
17
+ contourpy==1.2.0
18
+ cryptography==42.0.4
19
+ ctransformers==0.2.27
20
+ cycler==0.12.1
21
+ dataclasses-json==0.6.4
22
+ dataclasses-json-speakeasy==0.5.11
23
+ Deprecated==1.2.14
24
+ diskcache==5.6.3
25
+ effdet==0.4.1
26
+ emoji==2.10.1
27
+ et-xmlfile==1.1.0
28
+ exceptiongroup==1.2.0
29
+ fastapi==0.109.2
30
+ filelock==3.13.1
31
+ filetype==1.2.0
32
+ flatbuffers==23.5.26
33
+ fonttools==4.49.0
34
+ frozenlist==1.4.1
35
+ fsspec==2024.2.0
36
+ greenlet==3.0.3
37
+ grpcio==1.60.1
38
+ grpcio-tools==1.60.1
39
+ h11==0.14.0
40
+ h2==4.1.0
41
+ hpack==4.0.0
42
+ httpcore==1.0.3
43
+ httpx==0.26.0
44
+ huggingface-hub==0.23.0
45
+ humanfriendly==10.0
46
+ hyperframe==6.0.1
47
+ idna==3.6
48
+ iopath==0.1.10
49
+ Jinja2==3.1.3
50
+ joblib==1.3.2
51
+ jsonpatch==1.33
52
+ jsonpath-python==1.0.6
53
+ jsonpointer==2.4
54
+ kiwisolver==1.4.5
55
+ #langchain==0.1.8
56
+ #langchain-community==0.0.21
57
+ #langchain-core==0.1.25
58
+ #langdetect==1.0.9
59
+ #langsmith==0.1.5
60
+ layoutparser==0.3.4
61
+ #llama_cpp_python==0.2.44
62
+ lxml==5.1.0
63
+ Markdown==3.5.2
64
+ MarkupSafe==2.1.5
65
+ marshmallow==3.20.2
66
+ matplotlib==3.8.3
67
+ mpmath==1.3.0
68
+ msg-parser==1.2.0
69
+ multidict==6.0.5
70
+ mypy-extensions==1.0.0
71
+ networkx==3.2.1
72
+ nltk==3.8.1
73
+ numpy==1.26.4
74
+ olefile==0.47
75
+ omegaconf==2.3.0
76
+ onnx==1.15.0
77
+ onnxruntime==1.15.1
78
+ #opencv-python==4.9.0.80
79
+ openpyxl==3.1.2
80
+ packaging==23.2
81
+ pandas==2.2.0
82
+ pdf2image==1.17.0
83
+ pdfminer.six==20221105
84
+ pdfplumber==0.10.4
85
+ pikepdf==8.13.0
86
+ pillow==10.2.0
87
+ pillow_heif==0.15.0
88
+ portalocker==2.8.2
89
+ protobuf==4.25.3
90
+ py-cpuinfo==9.0.0
91
+ pycocotools==2.0.7
92
+ pycparser==2.21
93
+ pydantic==2.6.1
94
+ pydantic_core==2.16.2
95
+ pypandoc==1.13
96
+ pyparsing==3.1.1
97
+ pypdf==4.0.2
98
+ pypdfium2==4.27.0
99
+ pyreadline3==3.4.1
100
+ pytesseract==0.3.10
101
+ python-dateutil==2.8.2
102
+ python-docx==1.1.0
103
+ python-iso639==2024.2.7
104
+ python-magic==0.4.27
105
+ python-multipart==0.0.9
106
+ python-pptx==0.6.23
107
+ pytz==2024.1
108
+ #pywin32==306
109
+ PyYAML==6.0.1
110
+ #qdrant-client==1.7.3
111
+ rapidfuzz==3.6.1
112
+ regex==2023.12.25
113
+ requests==2.31.0
114
+ safetensors==0.4.2
115
+ scikit-learn==1.4.1.post1
116
+ scipy==1.12.0
117
+ sentence-transformers==2.6.0
118
+ sentencepiece==0.2.0
119
+ six==1.16.0
120
+ sniffio==1.3.0
121
+ soupsieve==2.5
122
+ SQLAlchemy==2.0.27
123
+ starlette==0.36.3
124
+ sympy==1.12
125
+ tabulate==0.9.0
126
+ tenacity==8.2.3
127
+ threadpoolctl==3.3.0
128
+ timm==0.9.16
129
+ tokenizers==0.19.1
130
+ #torch==2.2.0
131
+ #torchvision==0.17.0
132
+ #tqdm==4.66.2
133
+ #typing-inspect==0.9.0
134
+ #typing_extensions==4.9.0
135
+ tzdata==2024.1
136
+ unstructured==0.12.4
137
+ unstructured-client==0.18.0
138
+ unstructured-inference==0.7.23
139
+ unstructured.pytesseract==0.3.12
140
+ urllib3==2.2.1
141
+ uvicorn==0.27.1
142
+ wrapt==1.16.0
143
+ xlrd==2.0.1
144
+ XlsxWriter==3.2.0
145
+ yarl==1.9.4
146
+
147
+ #langchain-core==0.1.25
148
+ #langdetect==1.0.9
149
+ #langsmith==0.1.5
150
+ langchain_huggingface
151
+ langchain-experimental
152
+
153
+
154
+ # for wikipedia as a tool
155
+ wikipedia
156
+ chromadb
157
+ gradio
158
+ seaborn
159
+
160
+ # for google-search as a tool
161
+ google-search-results
162
+ langchainhub
163
+ streamlit
164
+ accelerate
165
+ langchain_chroma
166
+ langchain_openai
167
+ datasets
168
+ tensorflow_datasets
welcome.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+
4
+ st.set_page_config(
5
+ page_title="Welcome!!!",
6
+ page_icon="πŸ‘‹",
7
+ )
8
+
9
+ st.write("# Welcome to PatentGuru! πŸ‘‹")
10
+ st.sidebar.success("Select a demo above")
11
+
12
+ st.markdown(
13
+ """
14
+ PatentGuru is an patent search assistant built specifically for
15
+ building patents on any subject. The project uses data from Google patents covering a gamut of 1.3 mn granted patents
16
+ across all categories
17
+
18
+ **πŸ‘ˆ Select a demo from the dropdown on the left** to see some examples
19
+ of what PatentGuru can do!
20
+
21
+ ### Want to learn more about patents?
22
+
23
+ - Check out [United States Patent and Trademark office](https://www.uspto.gov/)
24
+ - Jump into the Open Source Documentation that was used for embedding [AI-Growth-Lab](https://huggingface.co/AI-Growth-Lab/PatentSBERTa)
25
+ - Ask a question in our [community
26
+ forums](https://discuss.streamlit.io)
27
+
28
+ ### See more on tensor flow datasets
29
+
30
+ - Use a tensor flow dataset to [analyze the patent categorization and abstract
31
+ Dataset](hhttps://www.tensorflow.org/datasets/catalog/big_patent)
32
+ - Explore a [European Patent Office](https://www.epo.org/en)
33
+ """
34
+ )
35
+