metadata
title: My Custom Space
emoji: 🤖
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 5.38.0
app_file: app.py
pinned: false
license: mit
short_description: AI chat interface
My Custom Space
Quick Deploy to HuggingFace Spaces
Step 1: Create the Space
- Go to https://huggingface.co/spaces
- Click "Create new Space"
- Choose a name for your Space
- Select Gradio as the SDK
- Set visibility (Public/Private)
- Click "Create Space"
Step 2: Upload Files
- In your new Space, click "Files" tab
- Upload these files from the zip:
app.py
requirements.txt
- Wait for "Building" to complete
Step 3: Add API Key
- Go to Settings (gear icon)
- Click "Variables and secrets"
- Click "New secret"
- Name:
OPENROUTER_API_KEY
- Value: Your OpenRouter API key
- Click "Add"
Step 4: Get Your API Key
- Go to https://openrouter.ai/keys
- Sign up/login if needed
- Click "Create Key"
- Copy the key (starts with
sk-or-
)
Step 5: Test Your Space
- Go back to "App" tab
- Your Space should be running!
- Try the example prompts or ask a question
Configuration
- Model: google/gemini-2.0-flash-001
- Temperature: 0.7
- Max Tokens: 750
- API Key Variable: OPENROUTER_API_KEY