xavierbarbier commited on
Commit
e7b3d73
·
verified ·
1 Parent(s): e73f137

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -46,6 +46,9 @@ def get_text_embedding(text):
46
  doc_path = hf_hub_download(repo_id="xavierbarbier/rag_ngap", filename="resource/embeddings_ngap.faiss", repo_type="space")
47
  index = faiss.read_index(doc_path)
48
 
 
 
 
49
  def qa(question):
50
  """Fonction principale pour répondre à la question en utilisant RAG avec jusqu'à 5 chunks."""
51
  if not GEMINI_API_KEY:
 
46
  doc_path = hf_hub_download(repo_id="xavierbarbier/rag_ngap", filename="resource/embeddings_ngap.faiss", repo_type="space")
47
  index = faiss.read_index(doc_path)
48
 
49
+ if not index:
50
+ print("Problème index")
51
+
52
  def qa(question):
53
  """Fonction principale pour répondre à la question en utilisant RAG avec jusqu'à 5 chunks."""
54
  if not GEMINI_API_KEY: