Create templates/client.html
Browse files- templates/client.html +56 -0
templates/client.html
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>EE Secure Client</title>
|
| 6 |
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 7 |
+
<style>
|
| 8 |
+
body { background: #f8f9fa; padding: 40px; }
|
| 9 |
+
.result { background: white; border: 1px solid #ddd; padding: 25px; border-radius: 10px; min-height: 220px; }
|
| 10 |
+
</style>
|
| 11 |
+
</head>
|
| 12 |
+
<body>
|
| 13 |
+
<div class="container">
|
| 14 |
+
<h1 class="mb-4">🔒 Equivariant Encryption Client</h1>
|
| 15 |
+
<p class="lead">Your prompt is encrypted locally before leaving this browser.</p>
|
| 16 |
+
|
| 17 |
+
<form method="POST">
|
| 18 |
+
<div class="mb-3">
|
| 19 |
+
<label class="form-label">Server Space URL</label>
|
| 20 |
+
<input type="url" class="form-control" name="server_url"
|
| 21 |
+
placeholder="https://your-ee-processor.hf.space" required>
|
| 22 |
+
</div>
|
| 23 |
+
<div class="mb-3">
|
| 24 |
+
<label class="form-label">EE Model Name</label>
|
| 25 |
+
<input type="text" class="form-control" name="ee_model_name"
|
| 26 |
+
placeholder="yourusername/qwen3-0.6b-dp-ee" required>
|
| 27 |
+
</div>
|
| 28 |
+
<div class="mb-3">
|
| 29 |
+
<label class="form-label">Your Secret EE Seed</label>
|
| 30 |
+
<input type="number" class="form-control" name="ee_seed" value="424242" required>
|
| 31 |
+
<small class="text-muted">Same seed you used when transforming the model</small>
|
| 32 |
+
</div>
|
| 33 |
+
<div class="mb-3">
|
| 34 |
+
<label class="form-label">Your Prompt</label>
|
| 35 |
+
<textarea class="form-control" name="prompt" rows="5" required></textarea>
|
| 36 |
+
</div>
|
| 37 |
+
<div class="mb-3">
|
| 38 |
+
<label class="form-label">Max New Tokens</label>
|
| 39 |
+
<input type="number" class="form-control" name="max_tokens" value="512">
|
| 40 |
+
</div>
|
| 41 |
+
<button type="submit" class="btn btn-primary btn-lg">Encrypt & Send to Blind Server</button>
|
| 42 |
+
</form>
|
| 43 |
+
|
| 44 |
+
{% if result %}
|
| 45 |
+
<h4 class="mt-5">Response from server (decrypted on your side):</h4>
|
| 46 |
+
<div class="result">{{ result }}</div>
|
| 47 |
+
{% endif %}
|
| 48 |
+
|
| 49 |
+
{% if error %}
|
| 50 |
+
<div class="alert alert-danger mt-5">{{ error }}</div>
|
| 51 |
+
{% endif %}
|
| 52 |
+
</div>
|
| 53 |
+
|
| 54 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
| 55 |
+
</body>
|
| 56 |
+
</html>
|