|
Download README.md from OrganizingForChange/WikiInterrogator: direct link, hf CLI and curl.
- Browser
- Download file 2.41 kB
-
https://huggingface.co/spaces/OrganizingForChange/WikiInterrogator/resolve/main/README.md
- Command line
-
hf download hf://spaces/OrganizingForChange/WikiInterrogator/README.md
-
curl -L -o README.md https://huggingface.co/spaces/OrganizingForChange/WikiInterrogator/resolve/main/README.md
2.41 kB
A newer version of the Gradio SDK is available: 6.32.0
metadata
title: Chat with Wiki Documents
emoji: π
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
Chat with Wiki Documents
A Gradio application that allows you to chat with documents from any online wiki using Retrieval Augmented Generation (RAG).
Features
- π Connect to any online wiki
- π Secure API key input
- π¬ Interactive chat interface
- π Automatic document fetching and processing
- π Semantic search across wiki content
- π€ Powered by OpenAI's GPT models
Setup
Install dependencies:
pip install -r requirements.txtGet an OpenAI API key:
- Sign up at OpenAI
- Create an API key from your dashboard
Run the application:
python app.pyOpen your browser:
- The app will be available at
http://localhost:7860 - Or use the public URL provided in the terminal
- The app will be available at
Usage
- Enter Wiki URL: Paste the URL of the wiki you want to chat with
- Enter API Key: Paste your OpenAI API key
- Click "Initialize RAG": This will fetch and process the wiki content
- Start Chatting: Ask questions about the wiki content in the chat interface
How It Works
- Document Fetching: The app fetches content from the specified wiki URL and follows links to gather multiple pages
- Text Processing: Documents are split into chunks for efficient processing
- Embedding: Text chunks are converted to embeddings using OpenAI's embedding model
- Vector Store: Embeddings are stored in a ChromaDB vector database
- Retrieval: When you ask a question, relevant chunks are retrieved using semantic search
- Generation: The retrieved context is used to generate an answer using GPT
Notes
- The app fetches up to 10 wiki pages by default
- Vector database is stored locally in
./chroma_db - Your API key is only used for API calls and not stored permanently
- Make sure the wiki URL is publicly accessible
Troubleshooting
- "Error fetching wiki content": Check that the wiki URL is correct and publicly accessible
- "Error initializing RAG": Verify your API key is valid and has credits
- Slow initialization: Large wikis may take time to process. Be patient!
License
MIT