Sam-max1 commited on
Commit
570f102
Β·
verified Β·
1 Parent(s): 4d376a9

Upload folder using huggingface_hub

Browse files
NITDAA_HEALTHEXPERT_USER_GUIDE.md CHANGED
@@ -26,6 +26,7 @@ When a question is submitted:
26
  - Your question will instantly appear in the output window.
27
  - The system will display a **"Generating answer.. (1.2s)"** timer.
28
  - Once context is retrieved from the Vector and Graph databases, the LLM will stream the Markdown-formatted answer back to the screen.
 
29
  - Responses remain preserved in the scrollable window for the duration of your session.
30
 
31
  ## 5. Security & Session Handling
 
26
  - Your question will instantly appear in the output window.
27
  - The system will display a **"Generating answer.. (1.2s)"** timer.
28
  - Once context is retrieved from the Vector and Graph databases, the LLM will stream the Markdown-formatted answer back to the screen.
29
+ - analysis may take upto 300 seconds due to slow shared resources. please keep patience.
30
  - Responses remain preserved in the scrollable window for the duration of your session.
31
 
32
  ## 5. Security & Session Handling
NITDAA_HEALTHEXPERT_USER_GUIDE.pdf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:33ef917007a829549380a693db443608e2304a24b0937ca445ce542f7902e48b
3
- size 189435
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71a1e46234c285f04912e31d4ef6739285ac60b4a6f0f9d9770ec877463627c1
3
+ size 189859
app.py CHANGED
@@ -106,7 +106,7 @@ _hf_api = None
106
  def get_hf_api():
107
  global _hf_api
108
  if _hf_api is None:
109
- token = os.environ.get("HF_SECRET_KEY")
110
  if token:
111
  _hf_api = HfApi(token=token)
112
  return _hf_api
@@ -694,10 +694,9 @@ def sync_he_data():
694
  try:
695
  import os, shutil
696
  from huggingface_hub import snapshot_download
697
-
698
- token = os.environ.get("HF_SECRET_KEY")
699
  if not token:
700
- log.error("HF_SECRET_KEY environment variable is not set. Dataset synchronization will be skipped.")
701
  return
702
 
703
  # --- 2-Way Log Sync on Startup ---
@@ -790,7 +789,7 @@ def sync_he_data():
790
  threading.Thread(target=sync_he_data, daemon=True).start()
791
 
792
  @app.route("/api/ingest", methods=["POST"])
793
- @limiter.limit("50 per hour")
794
  def ingest():
795
  """Upload and asynchronously ingest one or more documents."""
796
  log.info("Ingest request received. Files in request: %s",
 
106
  def get_hf_api():
107
  global _hf_api
108
  if _hf_api is None:
109
+ token = os.environ.get("HF_PRIVATE_TOKEN")
110
  if token:
111
  _hf_api = HfApi(token=token)
112
  return _hf_api
 
694
  try:
695
  import os, shutil
696
  from huggingface_hub import snapshot_download
697
+ token = os.environ.get("HF_PRIVATE_TOKEN")
 
698
  if not token:
699
+ log.error("HF_PRIVATE_TOKEN environment variable is not set. Dataset synchronization will be skipped.")
700
  return
701
 
702
  # --- 2-Way Log Sync on Startup ---
 
789
  threading.Thread(target=sync_he_data, daemon=True).start()
790
 
791
  @app.route("/api/ingest", methods=["POST"])
792
+ @limiter.limit("10 per minute")
793
  def ingest():
794
  """Upload and asynchronously ingest one or more documents."""
795
  log.info("Ingest request received. Files in request: %s",
start.sh CHANGED
@@ -90,6 +90,10 @@ else
90
  echo "[pre-flight] Done."
91
  fi
92
 
 
 
 
 
93
  # ── Start embed_llm on port 8003 ──────────────────────────────────────────────
94
  echo "[1/3] Starting embed_llm (port 8003)..."
95
  python agents/embed_llm.py &
 
90
  echo "[pre-flight] Done."
91
  fi
92
 
93
+ # ── Uninstall conflicting torchaudio to prevent OSError ─────────────────────────
94
+ echo "[pre-flight] Removing torchaudio to prevent transformers loading issues on HF..."
95
+ python -m pip uninstall -y torchaudio || true
96
+
97
  # ── Start embed_llm on port 8003 ──────────────────────────────────────────────
98
  echo "[1/3] Starting embed_llm (port 8003)..."
99
  python agents/embed_llm.py &