test-bot / README.md
milwright's picture
Upload 4 files
0322f77 verified
|
raw
history blame
1.87 kB
metadata
app_file: app.py
colorFrom: blue
colorTo: green
emoji: ✍️
license: mit
pinned: false
sdk: gradio
sdk_version: 5.39.0
short_description: A sentence level writing assistant
title: Writing Aid

Writing Aid

A sentence level writing assistant

Quick Deploy to HuggingFace Spaces

Step 1: Create the Space

  1. Go to https://huggingface.co/spaces
  2. Click "Create new Space"
  3. Choose a name for your Space
  4. Select Gradio as the SDK
  5. Set visibility (Public/Private)
  6. Click "Create Space"

Step 2: Upload Files

  1. In your new Space, click "Files" tab
  2. Upload these files from the zip:
    • app.py
    • requirements.txt
    • config.json
    • README.md
  3. Wait for "Building" to complete

Step 3: Add Access Code (Required)

  1. In Settings, click "Variables and secrets"
  2. Click "New secret"
  3. Name: ACCESS_CODE
  4. Value: Your chosen access code/password
  5. Click "Add"
  6. Important: Share this code with your students!

Step 4: Add OpenRouter API Key

  1. Get your API key from https://openrouter.ai/keys
  2. In your Space Settings, click "Variables and secrets"
  3. Click "New secret"
  4. Name: API_KEY
  5. Value: Your OpenRouter API key (starts with sk-or-)
  6. Click "Add"

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: anthropic/claude-3.5-sonnet
  • API Key Variable: API_KEY
  • Access Code Variable: ACCESS_CODE

Faculty Configuration

If you set HF_TOKEN and SPACE_ID environment variables, a Configuration tab will appear allowing you to:

  • Edit the system prompt
  • Change the AI model
  • Update example prompts
  • Modify grounding URLs
  • Adjust temperature and response length
  • Lock configuration to prevent further changes

Changes save automatically and the Space restarts to apply them.