Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.35.0
π API Keys Setup Guide
How to Get Pinecone API Key
Step 1: Create Pinecone Account
- Go to https://www.pinecone.io/
- Click "Sign Up" or "Get Started Free"
- Create account with your email or sign up with Google/GitHub
- Verify your email address if required
Step 2: Access Dashboard
- Log into your Pinecone account
- You'll be taken to the Pinecone Console/Dashboard
- Look for "API Keys" in the left sidebar or navigation menu
Step 3: Get Your API Key
- Click on "API Keys" in the dashboard
- You'll see your default API key listed
- Click "Copy" or the copy icon next to the API key
- Save this key securely - you'll need it for the application
How to Get Gemini API Key
Step 1: Go to Google AI Studio
- Visit https://aistudio.google.com/
- Sign in with your Google account
Step 2: Get API Key
- Click "Get API Key" in the top navigation
- Click "Create API Key"
- Select your Google Cloud project (or create a new one)
- Copy the generated API key
How to Get Tavily API Key
Step 1: Create Tavily Account
- Go to https://app.tavily.com/
- Click "Sign Up" and register with your email or use a social login
- Verify your email address if prompted
Step 2: Access API Keys
- Log into your Tavily account
- Navigate to the "API Keys" section in your dashboard
- Click "Create API Key" if you don't have one yet
- Copy the generated API key and store it securely
π Quick Start Guide
Option 1: Set Environment Variables Temporarily
Windows Command Prompt:
set PINECONE_API_KEY=pc-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
set GEMINI_API_KEY=AIzaSyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
set TAVILY_API_KEY=tvly_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
python app.py
Windows PowerShell:
$env:PINECONE_API_KEY="pc-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
$env:GEMINI_API_KEY="AIzaSyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
$env:TAVILY_API_KEY="tvly_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
python app.py
Option 2: Create .env File (Recommended)
- Create a file named
.env
in your project root:
PINECONE_API_KEY=pc-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GEMINI_API_KEY=AIzaSyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TAVILY_API_KEY=tvly_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # Optional
- Run the application:
python app.py
π Free Tier Information
Pinecone Free Tier:
- β 1 project
- β 1 index
- β 100K vectors
- β Perfect for hackathons and testing
Gemini Free Tier:
- β 15 requests per minute
- β 1 million tokens per day
- β Sufficient for development and demos
Tavily Free Tier:
- β Generous free tier for testing and development
- β Check Tavily Pricing for current limits
π§ Troubleshooting
If you get "Invalid API Key" errors:
- Double-check the API key is copied correctly
- Make sure there are no extra spaces
- Verify the environment variable is set:
echo %PINECONE_API_KEY%
If Pinecone connection fails:
- Check your internet connection
- Verify your Pinecone account is active
- Make sure you're using the correct region (default is usually fine)
π― Ready to Launch
Once you have all API keys:
- Set the environment variables
- Run the application:
python app.py
- Open your browser to:
http://localhost:7860
- Start uploading documents and asking questions!
The application will now have full functionality with:
- β Document processing and embedding
- β Vector storage in Pinecone
- β AI-powered question answering
- β Beautiful Gradio interface
π Your AI Embedded Knowledge Agent will be fully operational!