Spaces:
Sleeping
Sleeping
Update app.py
Browse files17 unmodified lines18192021222317 unmodified linesfaiss_index, chunk_texts, chunks = build_faiss_index(chunks)return f"✅ Uploaded and indexed {len(chunks)} chunks."def set_api_key(api_key):global groq_api_keygroq_api_key = api_key17 unmodified lines1819202122232425262728293017 unmodified linesfaiss_index, chunk_texts, chunks = build_faiss_index(chunks)return f"✅ Uploaded and indexed {len(chunks)} chunks."def extract_text_from_pdf(file_path):doc = fitz.open(file_path) # file_path is already a stringpages = [page.get_text() for page in doc]return pagesdef set_api_key(api_key):global groq_api_keygroq_api_key = api_key
app.py+7