Downloads · 30 days
0
engresearch/tenderhub-webai-verification
tenderhub-webai-verification is a machine learning model from engresearch. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A secondary verification layer for tender document processing using the webAI-ColVec1-4b multimodal model. This worker provides an alternative analysis pipeline to cross-validate the primary worker's results.
Downloads · 30 days
0
Access
Public
Updated Apr 17, 2026
Repo size
245 KB
Likes
0
Public
Click a slice to open those files.
.json858 KB · 34%
From the Hugging Face model README
A secondary verification layer for tender document processing using the webAI-ColVec1-4b multimodal model. This worker provides an alternative analysis pipeline to cross-validate the primary worker's results.
This worker uses a different approach than the primary worker:
# Create new space on Hugging Face
huggingface-cli space create \
--name tenderhub-webai-verification \
--space-type gradio \
--hardware cpu-basic \
--private
Set these in your HF Space settings:
DATABASE_URL=postgresql://user:pass@host:port/db
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
SUPABASE_STORAGE_BUCKET=tender-documents
The worker automatically applies several OOM prevention strategies:
Vision tensors can leave 4GB+ of "ghost memory" due to Python's lazy garbage collection. The worker implements aggressive cleanup:
Cleanup Strategy:
torch.cuda.empty_cache()Cleanup Triggers:
aggressive_memory_cleanup()Monitoring:
# Monitor cleanup effectiveness
grep "memory.cleanup" /var/log/app.log | jq '.memory_freed_gb'
# Track ghost memory prevention
grep "memory_freed_gb" /var/log/app.log | awk '{sum+=$2} END {print "Total freed: " sum "GB"}'
High DPI (200-300) significantly improves extraction quality for messy documents:
Memory Impact Analysis:
Adaptive DPI Scaling:
Configuration Options:
# Set maximum DPI (default: 200)
PDF_DPI=300
# Enable adaptive scaling (default: true)
ADAPTIVE_DPI=true
Add verification tables to your PostgreSQL database:
-- WebAI verification results
CREATE TABLE public.webai_verifications (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tender_id UUID NOT NULL REFERENCES public.tenders(id),
analysis JSONB NOT NULL,
comparison JSONB NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
INDEX (tender_id)
);
-- Add verification status to tenders
ALTER TABLE public.tenders
ADD COLUMN verification_status TEXT DEFAULT 'PENDING',
ADD COLUMN verification_score FLOAT DEFAULT 0.0;
The worker automatically processes verification jobs from the queue:
-- Queue a verification job
INSERT INTO public.processing_jobs (tender_id, job_type, payload)
VALUES ('tender-uuid', 'VERIFY', '{}');
Use the Gradio interface to test individual documents:
Access verification results via the database:
-- Get verification for a tender
SELECT
tender_id,
analysis->>'tenderTitle' as title,
comparison->>'agreement_score' as agreement_score,
comparison->'recommendation_comparison' as bid_comparison,
created_at
FROM public.webai_verifications
WHERE tender_id = 'your-tender-id';
The worker provides detailed comparison metrics:
Monitor worker performance through structured logs:
# View recent verification logs
grep "webai-verification-worker" /var/log/app.log | tail -20
# Check agreement score distribution
grep "agreement_score" /var/log/app.log | jq '.agreement_score'
max_new_tokens to reduce memory usage