drguilhermeapolinario commited on
Commit
75dc03e
verified
1 Parent(s): 4a9ffaf

Update views/rag_med.py

Browse files
Files changed (1) hide show
  1. views/rag_med.py +3 -4
views/rag_med.py CHANGED
@@ -18,7 +18,7 @@ def find_file(filename):
18
  os.path.join(current_dir, filename),
19
  os.path.join(root_dir, filename),
20
  os.path.join("/content", filename), # Para ambientes como Colab
21
- os.path.join("/home/user/app", filename) # Caminho comum no Hugging Face
22
  ]
23
 
24
  for path in possible_paths:
@@ -57,9 +57,8 @@ with st.sidebar:
57
  # Carregando o 铆ndice FAISS e os dados armazenados
58
  @st.cache_resource
59
  def load_faiss_index():
60
- # Caminho relativo para os arquivos FAISS no diret贸rio raiz
61
- index_file = os.path.join("..", "faiss_index.bin")
62
- data_file = os.path.join("..", "stored_data.pkl")
63
 
64
  index = faiss.read_index(index_file)
65
  with open(data_file, 'rb') as f:
 
18
  os.path.join(current_dir, filename),
19
  os.path.join(root_dir, filename),
20
  os.path.join("/content", filename), # Para ambientes como Colab
21
+ os.path.join("drguilhermeapolinario/Flamengo/", filename) # Caminho comum no Hugging Face
22
  ]
23
 
24
  for path in possible_paths:
 
57
  # Carregando o 铆ndice FAISS e os dados armazenados
58
  @st.cache_resource
59
  def load_faiss_index():
60
+ index_file = find_file("faiss_index.bin")
61
+ data_file = find_file("stored_data.pkl")
 
62
 
63
  index = faiss.read_index(index_file)
64
  with open(data_file, 'rb') as f: