Spaces:
Running
Running
metadata
title: PlasmidGPT API
emoji: 🧬
colorFrom: blue
colorTo: green
sdk: docker
sdk_version: 4.0.0
app_file: Dockerfile
pinned: false
license: cc-by-nc-4.0
PlasmidGPT API Service
This HuggingFace Space deploys the PlasmidGPT model as a FastAPI service for DNA sequence generation.
Features
- 🧬 DNA sequence generation using PlasmidGPT
- 🚀 FastAPI REST API
- 💻 GPU acceleration (free on HuggingFace)
- 🔒 CORS enabled for external API calls
API Endpoints
Health Check
GET /health
Generate Sequences
POST /generate
Content-Type: application/json
{
"prompt": "ATGAAA",
"max_length": 100,
"temperature": 0.7,
"num_return_sequences": 1,
"do_sample": true,
"repetition_penalty": 1.1
}
Usage from Render Backend
Once deployed, your Render backend can call this Space:
import httpx
space_url = "https://your-username-plasmidgpt-api.hf.space"
response = await httpx.post(
f"{space_url}/generate",
json={
"prompt": "ATGAAA",
"max_length": 100,
"temperature": 0.7
}
)
Setup Instructions
Create Space:
- Go to https://huggingface.co/spaces
- Click "Create new Space"
- Name:
your-username/plasmidgpt-api - SDK: Docker
- Visibility: Public
Upload Files:
- Upload
app.py - Upload
requirements.txt - Upload
Dockerfile(if using Docker SDK)
- Upload
Deploy:
- Space will automatically build and deploy
- Wait for model to load (first time takes ~5-10 minutes)
- Check
/healthendpoint to verify
Get Space URL:
- Your Space URL:
https://your-username-plasmidgpt-api.hf.space - Use this in your Render backend configuration
- Your Space URL:
Notes
- First deployment takes longer (model download)
- Model uses GPU if available (free on HuggingFace)
- Space sleeps after inactivity (wake up on first request)
- CORS is enabled for external API calls