Spaces:
Sleeping
Sleeping
danialraza92
commited on
Commit
·
9cca721
1
Parent(s):
3fbd9b4
Updated user and removed file limit
Browse files
private_gpt/server/ingest/ingest_router.py
CHANGED
@@ -27,12 +27,12 @@ def ingest(request: Request, files: List[UploadFile]) -> IngestResponse:
|
|
27 |
|
28 |
existing_documents = service.list_ingested_filenames()
|
29 |
|
30 |
-
if len(existing_documents) + len(files) > 5:
|
31 |
-
|
32 |
|
33 |
# Limit on number of files:
|
34 |
-
if len(files) > 5:
|
35 |
-
|
36 |
|
37 |
# Limit on file extensions:
|
38 |
allowed_extensions = {"pdf", "csv"}
|
|
|
27 |
|
28 |
existing_documents = service.list_ingested_filenames()
|
29 |
|
30 |
+
# if len(existing_documents) + len(files) > 5:
|
31 |
+
# raise HTTPException(403, "File limit reached. Maximum 5 files allowed.")
|
32 |
|
33 |
# Limit on number of files:
|
34 |
+
# if len(files) > 5:
|
35 |
+
# raise HTTPException(400, "File limit reached (maximum 5 files allowed)")
|
36 |
|
37 |
# Limit on file extensions:
|
38 |
allowed_extensions = {"pdf", "csv"}
|
private_gpt/server/utils/authentication.py
CHANGED
@@ -29,9 +29,9 @@ hardcoded_users = [
|
|
29 |
},
|
30 |
|
31 |
{ "id": str(uuid.uuid4()),
|
32 |
-
"username": "
|
33 |
-
"first_name": "
|
34 |
-
"last_name": "
|
35 |
"password_hash": bcrypt_context.hash(os.environ.get("ADMIN_HASH")),
|
36 |
"role": "admin"
|
37 |
},
|
|
|
29 |
},
|
30 |
|
31 |
{ "id": str(uuid.uuid4()),
|
32 |
+
"username": "mohamad",
|
33 |
+
"first_name": "Mohamad",
|
34 |
+
"last_name": "Takwa",
|
35 |
"password_hash": bcrypt_context.hash(os.environ.get("ADMIN_HASH")),
|
36 |
"role": "admin"
|
37 |
},
|