pvanand commited on
Commit
de5a712
1 Parent(s): 03102c2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -35,7 +35,7 @@ class QueryRequest(BaseModel):
35
 
36
  def save_embeddings(index_id, document_list):
37
  try:
38
- folder_path = f"indexes/{index_id}"
39
  os.makedirs(folder_path, exist_ok=True)
40
 
41
  # Save embeddings
@@ -51,7 +51,7 @@ def save_embeddings(index_id, document_list):
51
 
52
  def load_embeddings(index_id):
53
  try:
54
- folder_path = f"indexes/{index_id}"
55
 
56
  if not os.path.exists(folder_path):
57
  logger.error(f"Index not found for index_id: {index_id}")
@@ -96,4 +96,4 @@ async def query_index(request: QueryRequest):
96
 
97
  if __name__ == "__main__":
98
  import uvicorn
99
- uvicorn.run(app, host="0.0.0.0", port=7860)
 
35
 
36
  def save_embeddings(index_id, document_list):
37
  try:
38
+ folder_path = f"/app/indexes/{index_id}"
39
  os.makedirs(folder_path, exist_ok=True)
40
 
41
  # Save embeddings
 
51
 
52
  def load_embeddings(index_id):
53
  try:
54
+ folder_path = f"/app/indexes/{index_id}"
55
 
56
  if not os.path.exists(folder_path):
57
  logger.error(f"Index not found for index_id: {index_id}")
 
96
 
97
  if __name__ == "__main__":
98
  import uvicorn
99
+ uvicorn.run(app, host="0.0.0.0", port=8000)