Spaces:
Paused
Paused
File size: 1,423 Bytes
bcf46c3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | import React, { useState, useEffect, useRef } from 'react';
import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer } from 'recharts';
import { initLocalEngine, routeInference } from '../utils/inferenceRouter';
import HCaptcha from '@hcaptcha/react-hcaptcha';
import { supabase, useAuth, GATEWAY_URL, LEMON_CHECKOUT_URL } from '../context';
export default function OpticParseSection({ apiKey }) {
const curl = `curl -X POST https://opticparse-python-sg.onrender.com/api/vision-scrape \\
-H "X-API-Key: ${apiKey || 'YOUR_API_KEY'}" \\
-H "Content-Type: application/json" \\
-d '{
"target_url": "https://news.ycombinator.com",
"extraction_query": "Extract top 5 post titles",
"response_schema": {
"posts": [{"title": "string"}]
}
}'`;
return (
<div className="card mt-2">
<h2>OpticParse — Vision Web Scraper</h2>
<p style={{fontFamily: 'monospace', color: 'var(--cyan)'}}>POST https://opticparse-python-sg.onrender.com/api/vision-scrape</p>
<div style={{ background: '#000', padding: '1rem', borderRadius: '8px', marginTop: '1rem' }}>
<pre style={{ margin: 0, fontSize: '0.85rem', color: 'var(--text)', whiteSpace: 'pre-wrap' }}>{curl}</pre>
</div>
<a href="https://opticparse.com" target="_blank" rel="noreferrer" className="btn btn-outline" style={{marginTop: '1rem', display: 'inline-block'}}>View Landing Page</a>
</div>
)
}
|