Spaces:
Sleeping
Sleeping
amrohendawi
commited on
Commit
β’
59b0827
1
Parent(s):
3877ade
refactoring & cleanup
Browse files- .gitignore +41 -3
- .idea/.gitignore +0 -3
- .idea/inspectionProfiles/profiles_settings.xml +0 -6
- .idea/misc.xml +0 -4
- .idea/modules.xml +0 -8
- .idea/search_mlReply.iml +0 -10
- .idea/vcs.xml +0 -6
- .streamlit/config.toml +1 -1
- document_qa_engine.py +2 -1
- utils.py +2 -4
.gitignore
CHANGED
@@ -1,6 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.env
|
|
|
2 |
.vscode
|
|
|
|
|
3 |
.idea
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
1 |
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
2 |
+
|
3 |
+
# dependencies
|
4 |
+
node_modules
|
5 |
+
.pnp
|
6 |
+
.pnp.js
|
7 |
+
|
8 |
+
# testing
|
9 |
+
coverage
|
10 |
+
|
11 |
+
# next.js
|
12 |
+
.next/
|
13 |
+
out/
|
14 |
+
build
|
15 |
+
|
16 |
+
# misc
|
17 |
+
.DS_Store
|
18 |
+
*.pem
|
19 |
+
|
20 |
+
# debug
|
21 |
+
npm-debug.log*
|
22 |
+
yarn-debug.log*
|
23 |
+
yarn-error.log*
|
24 |
+
.pnpm-debug.log*
|
25 |
+
|
26 |
+
# local env files
|
27 |
+
.env.local
|
28 |
+
.env.development.local
|
29 |
+
.env.test.local
|
30 |
+
.env.production.local
|
31 |
+
|
32 |
+
# turbo
|
33 |
+
.turbo
|
34 |
+
|
35 |
+
.contentlayer
|
36 |
.env
|
37 |
+
.vercel
|
38 |
.vscode
|
39 |
+
|
40 |
+
# JetBrains
|
41 |
.idea
|
42 |
+
|
43 |
+
# datasets directory is used for local development
|
44 |
+
/datasets/
|
.idea/.gitignore
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
# Default ignored files
|
2 |
-
/shelf/
|
3 |
-
/workspace.xml
|
|
|
|
|
|
|
|
.idea/inspectionProfiles/profiles_settings.xml
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<component name="InspectionProjectProfileManager">
|
2 |
-
<settings>
|
3 |
-
<option name="USE_PROJECT_PROFILE" value="false" />
|
4 |
-
<version value="1.0" />
|
5 |
-
</settings>
|
6 |
-
</component>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.idea/misc.xml
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<project version="4">
|
3 |
-
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (search_mlReply)" project-jdk-type="Python SDK" />
|
4 |
-
</project>
|
|
|
|
|
|
|
|
|
|
.idea/modules.xml
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<project version="4">
|
3 |
-
<component name="ProjectModuleManager">
|
4 |
-
<modules>
|
5 |
-
<module fileurl="file://$PROJECT_DIR$/.idea/search_mlReply.iml" filepath="$PROJECT_DIR$/.idea/search_mlReply.iml" />
|
6 |
-
</modules>
|
7 |
-
</component>
|
8 |
-
</project>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.idea/search_mlReply.iml
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<module type="PYTHON_MODULE" version="4">
|
3 |
-
<component name="NewModuleRootManager">
|
4 |
-
<content url="file://$MODULE_DIR$">
|
5 |
-
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
6 |
-
</content>
|
7 |
-
<orderEntry type="inheritedJdk" />
|
8 |
-
<orderEntry type="sourceFolder" forTests="false" />
|
9 |
-
</component>
|
10 |
-
</module>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.idea/vcs.xml
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<project version="4">
|
3 |
-
<component name="VcsDirectoryMappings">
|
4 |
-
<mapping directory="" vcs="Git" />
|
5 |
-
</component>
|
6 |
-
</project>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.streamlit/config.toml
CHANGED
@@ -3,4 +3,4 @@ primaryColor = "#E694FF"
|
|
3 |
backgroundColor = "#FFFFFF"
|
4 |
secondaryBackgroundColor = "#F0F0F0"
|
5 |
textColor = "#262730"
|
6 |
-
font = "sans
|
|
|
3 |
backgroundColor = "#FFFFFF"
|
4 |
secondaryBackgroundColor = "#F0F0F0"
|
5 |
textColor = "#262730"
|
6 |
+
font = "sans serif"
|
document_qa_engine.py
CHANGED
@@ -73,7 +73,8 @@ def create_ingestion_pipeline(document_store):
|
|
73 |
|
74 |
def create_inference_pipeline(document_store, model_name, api_key):
|
75 |
if model_name == "local LLM":
|
76 |
-
generator = OpenAIChatGenerator(
|
|
|
77 |
api_base_url="http://localhost:1234/v1",
|
78 |
generation_kwargs={"max_tokens": MAX_TOKENS}
|
79 |
)
|
|
|
73 |
|
74 |
def create_inference_pipeline(document_store, model_name, api_key):
|
75 |
if model_name == "local LLM":
|
76 |
+
generator = OpenAIChatGenerator(api_key=Secret.from_token("<local LLM doesn't need an API key>"),
|
77 |
+
model=model_name,
|
78 |
api_base_url="http://localhost:1234/v1",
|
79 |
generation_kwargs={"max_tokens": MAX_TOKENS}
|
80 |
)
|
utils.py
CHANGED
@@ -35,10 +35,8 @@ def init_qa(model, api_key=None):
|
|
35 |
|
36 |
|
37 |
def append_header():
|
38 |
-
|
39 |
-
|
40 |
-
st.header('π Document Insights :rainbow[AI] Assistant π', divider='rainbow')
|
41 |
-
st.text("π₯ Upload documents in PDF format. Get insights.. ask questions..")
|
42 |
|
43 |
|
44 |
def append_documentation_to_sidebar():
|
|
|
35 |
|
36 |
|
37 |
def append_header():
|
38 |
+
st.header('π Document Insights :rainbow[AI] Assistant π', divider='rainbow')
|
39 |
+
st.text("π₯ Upload documents in PDF format. Get insights.. ask questions..")
|
|
|
|
|
40 |
|
41 |
|
42 |
def append_documentation_to_sidebar():
|