srivatsavdamaraju commited on
Commit
514a727
Β·
verified Β·
1 Parent(s): 9303bc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -690,7 +690,7 @@ def search_documents(query: str) -> str:
690
  collection_name = 9 # As per the URL path in your curl example
691
  top_k = 5 # Default value, as shown in the curl
692
 
693
- url = f"http://127.0.0.1:8000/search/{collection_name}"
694
  params = {
695
  "query": query,
696
  "top_k": top_k
@@ -1670,7 +1670,7 @@ def save_to_txt(data: dict, filename: str = "datasets_summary.txt"):
1670
  print(f"βœ… Dataset info saved to {filename}")
1671
 
1672
 
1673
- def check_and_create_collection(userLoginId: str, base_url="http://127.0.0.1:8000") -> bool:
1674
  get_url = f"{base_url}/collections/"
1675
  headers = {'accept': 'application/json'}
1676
 
@@ -1982,8 +1982,10 @@ def health():
1982
  if __name__ == "__main__":
1983
  import uvicorn
1984
  try:
1985
- uvicorn.run(app, host="0.0.0.0", port=8000)
1986
  except KeyboardInterrupt:
1987
  print("\nπŸ›‘ Server stopped gracefully")
1988
  except Exception as e:
1989
- print(f"❌ Server error: {e}")
 
 
 
690
  collection_name = 9 # As per the URL path in your curl example
691
  top_k = 5 # Default value, as shown in the curl
692
 
693
+ url = f"https://srivatsavdamaraju-accusaga-bot.hf.space/search/{collection_name}"
694
  params = {
695
  "query": query,
696
  "top_k": top_k
 
1670
  print(f"βœ… Dataset info saved to {filename}")
1671
 
1672
 
1673
+ def check_and_create_collection(userLoginId: str, base_url="https://srivatsavdamaraju-accusaga-bot.hf.space") -> bool:
1674
  get_url = f"{base_url}/collections/"
1675
  headers = {'accept': 'application/json'}
1676
 
 
1982
  if __name__ == "__main__":
1983
  import uvicorn
1984
  try:
1985
+ uvicorn.run(app)
1986
  except KeyboardInterrupt:
1987
  print("\nπŸ›‘ Server stopped gracefully")
1988
  except Exception as e:
1989
+ print(f"❌ Server error: {e}")
1990
+
1991
+ #bot8.py