Spaces:
Running
Running
abadesalex
commited on
Commit
β’
fe7c659
1
Parent(s):
aae751e
src directory
Browse files- Api/{src β app}/__pycache__/main.cpython-310.pyc +0 -0
- Api/{src β app}/db_local_storage/__pycache__/documents_db.cpython-310.pyc +0 -0
- Api/{src β app}/db_local_storage/__pycache__/files_db.cpython-310.pyc +0 -0
- Api/{src β app}/db_local_storage/__pycache__/files_names_db.cpython-310.pyc +0 -0
- Api/{src β app}/db_local_storage/__pycache__/in_memory_db.cpython-310.pyc +0 -0
- Api/{src β app}/db_local_storage/__pycache__/vector_files_db.cpython-310.pyc +0 -0
- Api/{src β app}/db_local_storage/documents_db.py +0 -0
- Api/{src β app}/db_local_storage/files_db.py +0 -0
- Api/{src β app}/db_local_storage/in_memory_db.py +0 -0
- Api/{src β app}/db_local_storage/vector_files_db.py +0 -0
- Api/{src β app}/main.py +2 -2
- Api/{src β app}/modules/querySearch/controllers/__pycache__/querySearch_controller.cpython-310.pyc +0 -0
- Api/{src β app}/modules/querySearch/controllers/querySearch_controller.py +1 -1
- Api/{src β app}/modules/querySearch/features/__pycache__/querySearch_feature.cpython-310.pyc +0 -0
- Api/{src β app}/modules/querySearch/features/querySearch_feature.py +2 -2
- Api/{src β app}/modules/querySearch/routes/__pycache__/querySearch_route.cpython-310.pyc +0 -0
- Api/{src β app}/modules/querySearch/routes/querySearch_route.py +3 -3
- Api/{src β app}/modules/uploadDocument/controllers/__pycache__/FileUploadController.cpython-310.pyc +0 -0
- Api/{src β app}/modules/uploadDocument/controllers/__pycache__/file_upload_controller.cpython-310.pyc +0 -0
- Api/{src β app}/modules/uploadDocument/controllers/file_upload_controller.py +3 -3
- Api/{src β app}/modules/uploadDocument/features/__pycache__/createEmbeddings_feature.cpython-310.pyc +0 -0
- Api/{src β app}/modules/uploadDocument/features/__pycache__/extractText_feature.cpython-310.pyc +0 -0
- Api/{src β app}/modules/uploadDocument/features/__pycache__/uploadDocument_feature.cpython-310.pyc +0 -0
- Api/{src β app}/modules/uploadDocument/features/createEmbeddings_feature.py +2 -2
- Api/{src β app}/modules/uploadDocument/features/extractText_feature.py +2 -2
- Api/{src β app}/modules/uploadDocument/features/uploadDocument_feature.py +2 -2
- Api/{src β app}/modules/uploadDocument/routes/__pycache__/uploadDocument_route.cpython-310.pyc +0 -0
- Api/{src β app}/modules/uploadDocument/routes/uploadDocument_route.py +3 -3
- Api/{src β app}/modules/uploadDocument/schemas/uploadDocument_schema.py +0 -0
- Api/{src β app}/out/404.html +0 -0
- Api/{src β app}/out/_next/static/8pPextYjcRlStoVtEQkF_/_buildManifest.js +0 -0
- Api/{src β app}/out/_next/static/8pPextYjcRlStoVtEQkF_/_ssgManifest.js +0 -0
- Api/{src β app}/out/_next/static/chunks/23-e94121395991ed2e.js +0 -0
- Api/{src β app}/out/_next/static/chunks/324-5c86793bec652c55.js +0 -0
- Api/{src β app}/out/_next/static/chunks/app/_not-found/page-88e5ec60d72eb81e.js +0 -0
- Api/{src β app}/out/_next/static/chunks/app/layout-921f3900800dd4a7.js +0 -0
- Api/{src β app}/out/_next/static/chunks/app/page-10e8a35fca12752e.js +0 -0
- Api/{src β app}/out/_next/static/chunks/fd9d1056-90960e0a7e77703c.js +0 -0
- Api/{src β app}/out/_next/static/chunks/framework-f66176bb897dc684.js +0 -0
- Api/{src β app}/out/_next/static/chunks/main-86caab0518fca858.js +0 -0
- Api/{src β app}/out/_next/static/chunks/main-app-f4f564f56624dcb5.js +0 -0
- Api/{src β app}/out/_next/static/chunks/pages/_app-6a626577ffa902a4.js +0 -0
- Api/{src β app}/out/_next/static/chunks/pages/_error-1be831200e60c5c0.js +0 -0
- Api/{src β app}/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js +0 -0
- Api/{src β app}/out/_next/static/chunks/webpack-17abec1bd4bca978.js +0 -0
- Api/{src β app}/out/index.html +0 -0
- Api/{src β app}/out/index.txt +0 -0
- Api/{src β app}/out/next.svg +0 -0
- Api/{src β app}/out/vercel.svg +0 -0
- Dockerfile +1 -1
Api/{src β app}/__pycache__/main.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/__pycache__/documents_db.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/__pycache__/files_db.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/__pycache__/files_names_db.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/__pycache__/in_memory_db.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/__pycache__/vector_files_db.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/documents_db.py
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/files_db.py
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/in_memory_db.py
RENAMED
File without changes
|
Api/{src β app}/db_local_storage/vector_files_db.py
RENAMED
File without changes
|
Api/{src β app}/main.py
RENAMED
@@ -4,9 +4,9 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
4 |
from fastapi.responses import FileResponse
|
5 |
from fastapi.staticfiles import StaticFiles
|
6 |
|
7 |
-
from
|
8 |
router as query_search_routes
|
9 |
-
from
|
10 |
router as upload_file_routes
|
11 |
|
12 |
app = FastAPI()
|
|
|
4 |
from fastapi.responses import FileResponse
|
5 |
from fastapi.staticfiles import StaticFiles
|
6 |
|
7 |
+
from app.modules.querySearch.routes.querySearch_route import \
|
8 |
router as query_search_routes
|
9 |
+
from app.modules.uploadDocument.routes.uploadDocument_route import \
|
10 |
router as upload_file_routes
|
11 |
|
12 |
app = FastAPI()
|
Api/{src β app}/modules/querySearch/controllers/__pycache__/querySearch_controller.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/querySearch/controllers/querySearch_controller.py
RENAMED
@@ -2,7 +2,7 @@ from typing import Any
|
|
2 |
from fastapi import HTTPException
|
3 |
from fastapi.responses import JSONResponse
|
4 |
|
5 |
-
from
|
6 |
|
7 |
|
8 |
class QuerySearchController:
|
|
|
2 |
from fastapi import HTTPException
|
3 |
from fastapi.responses import JSONResponse
|
4 |
|
5 |
+
from app.modules.querySearch.features.querySearch_feature import QuerySearchFeature
|
6 |
|
7 |
|
8 |
class QuerySearchController:
|
Api/{src β app}/modules/querySearch/features/__pycache__/querySearch_feature.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/querySearch/features/querySearch_feature.py
RENAMED
@@ -6,8 +6,8 @@ from fastapi.responses import JSONResponse
|
|
6 |
from sentence_transformers import SentenceTransformer
|
7 |
from transformers import pipeline
|
8 |
|
9 |
-
from
|
10 |
-
from
|
11 |
|
12 |
|
13 |
class QuerySearchFeature:
|
|
|
6 |
from sentence_transformers import SentenceTransformer
|
7 |
from transformers import pipeline
|
8 |
|
9 |
+
from app.db_local_storage.files_db import VECTOR_FILES_DIRECTORY
|
10 |
+
from app.db_local_storage.in_memory_db import query_response_storage
|
11 |
|
12 |
|
13 |
class QuerySearchFeature:
|
Api/{src β app}/modules/querySearch/routes/__pycache__/querySearch_route.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/querySearch/routes/querySearch_route.py
RENAMED
@@ -3,11 +3,11 @@ from fastapi.responses import JSONResponse
|
|
3 |
from sentence_transformers import SentenceTransformer
|
4 |
from transformers import pipeline
|
5 |
|
6 |
-
from
|
7 |
-
from
|
8 |
QuerySearchController,
|
9 |
)
|
10 |
-
from
|
11 |
|
12 |
|
13 |
router = APIRouter()
|
|
|
3 |
from sentence_transformers import SentenceTransformer
|
4 |
from transformers import pipeline
|
5 |
|
6 |
+
from app.modules.querySearch.features.querySearch_feature import QuerySearchFeature
|
7 |
+
from app.modules.querySearch.controllers.querySearch_controller import (
|
8 |
QuerySearchController,
|
9 |
)
|
10 |
+
from app.db_local_storage.in_memory_db import query_response_storage
|
11 |
|
12 |
|
13 |
router = APIRouter()
|
Api/{src β app}/modules/uploadDocument/controllers/__pycache__/FileUploadController.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/uploadDocument/controllers/__pycache__/file_upload_controller.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/uploadDocument/controllers/file_upload_controller.py
RENAMED
@@ -3,11 +3,11 @@ from typing import Any
|
|
3 |
from fastapi import HTTPException, UploadFile
|
4 |
from fastapi.responses import JSONResponse
|
5 |
|
6 |
-
from
|
7 |
CreateEmbeddingsFeature,
|
8 |
)
|
9 |
-
from
|
10 |
-
from
|
11 |
UploadDocumentFeature,
|
12 |
)
|
13 |
|
|
|
3 |
from fastapi import HTTPException, UploadFile
|
4 |
from fastapi.responses import JSONResponse
|
5 |
|
6 |
+
from app.modules.uploadDocument.features.createEmbeddings_feature import (
|
7 |
CreateEmbeddingsFeature,
|
8 |
)
|
9 |
+
from app.modules.uploadDocument.features.extractText_feature import ExtractTextFeature
|
10 |
+
from app.modules.uploadDocument.features.uploadDocument_feature import (
|
11 |
UploadDocumentFeature,
|
12 |
)
|
13 |
|
Api/{src β app}/modules/uploadDocument/features/__pycache__/createEmbeddings_feature.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/uploadDocument/features/__pycache__/extractText_feature.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/uploadDocument/features/__pycache__/uploadDocument_feature.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/uploadDocument/features/createEmbeddings_feature.py
RENAMED
@@ -3,8 +3,8 @@ from typing import List
|
|
3 |
|
4 |
from sentence_transformers import SentenceTransformer
|
5 |
|
6 |
-
from
|
7 |
-
from
|
8 |
|
9 |
|
10 |
class CreateEmbeddingsFeature:
|
|
|
3 |
|
4 |
from sentence_transformers import SentenceTransformer
|
5 |
|
6 |
+
from app.db_local_storage.files_db import VECTOR_FILES_DIRECTORY
|
7 |
+
from app.db_local_storage.vector_files_db import vector_files_db as EMBEDDING_DATA
|
8 |
|
9 |
|
10 |
class CreateEmbeddingsFeature:
|
Api/{src β app}/modules/uploadDocument/features/extractText_feature.py
RENAMED
@@ -6,8 +6,8 @@ from fastapi import UploadFile
|
|
6 |
from PyPDF2 import PdfReader
|
7 |
import pdfplumber
|
8 |
|
9 |
-
from
|
10 |
-
from
|
11 |
|
12 |
|
13 |
class ExtractTextFeature:
|
|
|
6 |
from PyPDF2 import PdfReader
|
7 |
import pdfplumber
|
8 |
|
9 |
+
from app.db_local_storage.files_db import TEXT_FILES_DIRECTORY
|
10 |
+
from app.db_local_storage.documents_db import documents_text
|
11 |
|
12 |
|
13 |
class ExtractTextFeature:
|
Api/{src β app}/modules/uploadDocument/features/uploadDocument_feature.py
RENAMED
@@ -2,8 +2,8 @@ import os
|
|
2 |
from typing import Dict
|
3 |
|
4 |
from fastapi import UploadFile
|
5 |
-
from
|
6 |
-
from
|
7 |
|
8 |
|
9 |
class UploadDocumentFeature:
|
|
|
2 |
from typing import Dict
|
3 |
|
4 |
from fastapi import UploadFile
|
5 |
+
from app.db_local_storage.files_db import FILES_DIRECTORY, FILES_NAMES_DATABASE
|
6 |
+
from app.db_local_storage.documents_db import documents_db
|
7 |
|
8 |
|
9 |
class UploadDocumentFeature:
|
Api/{src β app}/modules/uploadDocument/routes/__pycache__/uploadDocument_route.cpython-310.pyc
RENAMED
File without changes
|
Api/{src β app}/modules/uploadDocument/routes/uploadDocument_route.py
RENAMED
@@ -1,10 +1,10 @@
|
|
1 |
from fastapi import APIRouter, File, HTTPException, UploadFile
|
2 |
from fastapi.responses import JSONResponse
|
3 |
-
from
|
4 |
-
from
|
5 |
FileUploadController,
|
6 |
)
|
7 |
-
from
|
8 |
|
9 |
router = APIRouter()
|
10 |
fileUploadController = FileUploadController()
|
|
|
1 |
from fastapi import APIRouter, File, HTTPException, UploadFile
|
2 |
from fastapi.responses import JSONResponse
|
3 |
+
from app.db_local_storage.vector_files_db import vector_files_db
|
4 |
+
from app.modules.uploadDocument.controllers.file_upload_controller import (
|
5 |
FileUploadController,
|
6 |
)
|
7 |
+
from app.db_local_storage.documents_db import documents_db
|
8 |
|
9 |
router = APIRouter()
|
10 |
fileUploadController = FileUploadController()
|
Api/{src β app}/modules/uploadDocument/schemas/uploadDocument_schema.py
RENAMED
File without changes
|
Api/{src β app}/out/404.html
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/8pPextYjcRlStoVtEQkF_/_buildManifest.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/8pPextYjcRlStoVtEQkF_/_ssgManifest.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/23-e94121395991ed2e.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/324-5c86793bec652c55.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/app/_not-found/page-88e5ec60d72eb81e.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/app/layout-921f3900800dd4a7.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/app/page-10e8a35fca12752e.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/fd9d1056-90960e0a7e77703c.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/framework-f66176bb897dc684.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/main-86caab0518fca858.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/main-app-f4f564f56624dcb5.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/pages/_app-6a626577ffa902a4.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/pages/_error-1be831200e60c5c0.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js
RENAMED
File without changes
|
Api/{src β app}/out/_next/static/chunks/webpack-17abec1bd4bca978.js
RENAMED
File without changes
|
Api/{src β app}/out/index.html
RENAMED
File without changes
|
Api/{src β app}/out/index.txt
RENAMED
File without changes
|
Api/{src β app}/out/next.svg
RENAMED
File without changes
|
Api/{src β app}/out/vercel.svg
RENAMED
File without changes
|
Dockerfile
CHANGED
@@ -25,7 +25,7 @@ RUN apt update && apt install -y ffmpeg
|
|
25 |
USER user
|
26 |
|
27 |
# Copy the application code and set the owner to the user
|
28 |
-
COPY --chown=user ./Api/
|
29 |
|
30 |
# Expose the port the app runs on
|
31 |
EXPOSE 8000
|
|
|
25 |
USER user
|
26 |
|
27 |
# Copy the application code and set the owner to the user
|
28 |
+
COPY --chown=user ./Api/app /home/user/app/app
|
29 |
|
30 |
# Expose the port the app runs on
|
31 |
EXPOSE 8000
|