Add 2 files
Browse files- index.html +366 -41
- prompts.txt +2 -1
index.html
CHANGED
|
@@ -3,13 +3,19 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>AI Humanizer
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
| 10 |
.gradient-bg {
|
| 11 |
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
|
| 12 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
.textarea-container {
|
| 14 |
position: relative;
|
| 15 |
}
|
|
@@ -31,14 +37,51 @@
|
|
| 31 |
50% { opacity: 1; }
|
| 32 |
100% { opacity: 0.6; }
|
| 33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
</style>
|
| 35 |
</head>
|
| 36 |
<body class="min-h-screen bg-gray-50 p-4">
|
| 37 |
-
<div class="max-w-
|
| 38 |
-
<div class="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
<!-- Input Section -->
|
| 40 |
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
|
| 41 |
-
<div class="
|
| 42 |
<h2 class="text-lg font-semibold text-white">
|
| 43 |
<i class="fas fa-keyboard mr-2"></i> AI Text Input
|
| 44 |
</h2>
|
|
@@ -46,15 +89,102 @@
|
|
| 46 |
<div class="p-4 textarea-container">
|
| 47 |
<textarea
|
| 48 |
id="aiInput"
|
| 49 |
-
class="w-full h-64 p-4 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-
|
| 50 |
placeholder="Paste your AI-generated text here..."></textarea>
|
| 51 |
<div id="inputWordCount" class="word-count">0 words</div>
|
| 52 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
</div>
|
| 54 |
|
| 55 |
<!-- Output Section -->
|
| 56 |
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
|
| 57 |
-
<div class="
|
| 58 |
<h2 class="text-lg font-semibold text-white">
|
| 59 |
<i class="fas fa-user mr-2"></i> Humanized Output
|
| 60 |
</h2>
|
|
@@ -67,22 +197,33 @@
|
|
| 67 |
readonly></textarea>
|
| 68 |
<div id="outputWordCount" class="word-count">0 words</div>
|
| 69 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
</div>
|
| 71 |
</div>
|
| 72 |
|
|
|
|
| 73 |
<div class="mt-4 text-center">
|
| 74 |
-
<
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
<div id="
|
| 81 |
-
<div class="inline-flex items-center
|
| 82 |
<div class="pulse">
|
| 83 |
<i class="fas fa-spinner fa-spin mr-2"></i>
|
| 84 |
</div>
|
| 85 |
-
<span>
|
| 86 |
</div>
|
| 87 |
</div>
|
| 88 |
|
|
@@ -97,13 +238,50 @@
|
|
| 97 |
|
| 98 |
<script>
|
| 99 |
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
| 100 |
const aiInput = document.getElementById('aiInput');
|
|
|
|
| 101 |
const humanOutput = document.getElementById('humanOutput');
|
|
|
|
|
|
|
| 102 |
const humanizeBtn = document.getElementById('humanizeBtn');
|
| 103 |
-
const
|
|
|
|
|
|
|
| 104 |
const errorMessage = document.getElementById('errorMessage');
|
| 105 |
const inputWordCount = document.getElementById('inputWordCount');
|
|
|
|
| 106 |
const outputWordCount = document.getElementById('outputWordCount');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
// Update word count for input
|
| 109 |
aiInput.addEventListener('input', function() {
|
|
@@ -112,9 +290,57 @@
|
|
| 112 |
inputWordCount.textContent = `${words} words`;
|
| 113 |
});
|
| 114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
// Humanize button click handler
|
| 116 |
humanizeBtn.addEventListener('click', async function() {
|
| 117 |
-
const inputText =
|
| 118 |
|
| 119 |
if (!inputText) {
|
| 120 |
showError("Please enter some text to humanize.");
|
|
@@ -122,13 +348,13 @@
|
|
| 122 |
}
|
| 123 |
|
| 124 |
// Show loading, hide error
|
| 125 |
-
|
| 126 |
errorMessage.classList.add('hidden');
|
| 127 |
humanizeBtn.disabled = true;
|
| 128 |
humanizeBtn.classList.add('opacity-75');
|
| 129 |
|
| 130 |
try {
|
| 131 |
-
//
|
| 132 |
const humanizedText = await simulateHumanizeApiCall(inputText);
|
| 133 |
|
| 134 |
humanOutput.value = humanizedText;
|
|
@@ -141,13 +367,123 @@
|
|
| 141 |
console.error("Error:", error);
|
| 142 |
showError("Failed to humanize text. Please try again later.");
|
| 143 |
} finally {
|
| 144 |
-
|
| 145 |
humanizeBtn.disabled = false;
|
| 146 |
humanizeBtn.classList.remove('opacity-75');
|
| 147 |
}
|
| 148 |
});
|
| 149 |
|
| 150 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
async function simulateHumanizeApiCall(text) {
|
| 152 |
// Simulate network delay
|
| 153 |
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
@@ -162,33 +498,22 @@
|
|
| 162 |
.replace(/\bthus\b/gi, 'so')
|
| 163 |
.replace(/\bhence\b/gi, 'that\'s why')
|
| 164 |
.replace(/\bnevertheless\b/gi, 'still')
|
| 165 |
-
.replace(/\bconsequently\b/gi, 'as a result')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
}
|
| 167 |
|
| 168 |
function showError(message) {
|
| 169 |
errorText.textContent = message;
|
| 170 |
errorMessage.classList.remove('hidden');
|
| 171 |
}
|
| 172 |
-
|
| 173 |
-
// Add copy to clipboard functionality
|
| 174 |
-
humanOutput.addEventListener('click', function() {
|
| 175 |
-
if (humanOutput.value) {
|
| 176 |
-
humanOutput.select();
|
| 177 |
-
document.execCommand('copy');
|
| 178 |
-
|
| 179 |
-
// Show temporary tooltip
|
| 180 |
-
const tooltip = document.createElement('div');
|
| 181 |
-
tooltip.className = 'fixed bg-gray-800 text-white px-3 py-1 rounded text-sm';
|
| 182 |
-
tooltip.textContent = 'Copied!';
|
| 183 |
-
tooltip.style.top = (event.pageY - 40) + 'px';
|
| 184 |
-
tooltip.style.left = (event.pageX - 30) + 'px';
|
| 185 |
-
document.body.appendChild(tooltip);
|
| 186 |
-
|
| 187 |
-
setTimeout(() => {
|
| 188 |
-
document.body.removeChild(tooltip);
|
| 189 |
-
}, 1000);
|
| 190 |
-
}
|
| 191 |
-
});
|
| 192 |
});
|
| 193 |
</script>
|
| 194 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=sqibhe/humanizer" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>AI Content Analyzer & Humanizer</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
| 10 |
.gradient-bg {
|
| 11 |
background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
|
| 12 |
}
|
| 13 |
+
.analyzer-bg {
|
| 14 |
+
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
| 15 |
+
}
|
| 16 |
+
.humanizer-bg {
|
| 17 |
+
background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
|
| 18 |
+
}
|
| 19 |
.textarea-container {
|
| 20 |
position: relative;
|
| 21 |
}
|
|
|
|
| 37 |
50% { opacity: 1; }
|
| 38 |
100% { opacity: 0.6; }
|
| 39 |
}
|
| 40 |
+
.progress-bar {
|
| 41 |
+
height: 10px;
|
| 42 |
+
border-radius: 5px;
|
| 43 |
+
background-color: #e5e7eb;
|
| 44 |
+
overflow: hidden;
|
| 45 |
+
}
|
| 46 |
+
.progress-fill {
|
| 47 |
+
height: 100%;
|
| 48 |
+
border-radius: 5px;
|
| 49 |
+
transition: width 0.5s ease;
|
| 50 |
+
}
|
| 51 |
+
.tab {
|
| 52 |
+
cursor: pointer;
|
| 53 |
+
transition: all 0.3s ease;
|
| 54 |
+
}
|
| 55 |
+
.tab.active {
|
| 56 |
+
transform: translateY(-2px);
|
| 57 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 58 |
+
}
|
| 59 |
</style>
|
| 60 |
</head>
|
| 61 |
<body class="min-h-screen bg-gray-50 p-4">
|
| 62 |
+
<div class="max-w-6xl mx-auto">
|
| 63 |
+
<div class="text-center mb-8">
|
| 64 |
+
<h1 class="text-3xl font-bold text-gray-800 mb-2">AI Content Analyzer & Humanizer</h1>
|
| 65 |
+
<p class="text-gray-600">Analyze your AI-generated content and transform it into natural human-like text</p>
|
| 66 |
+
</div>
|
| 67 |
+
|
| 68 |
+
<!-- Tabs -->
|
| 69 |
+
<div class="flex justify-center mb-6">
|
| 70 |
+
<div class="inline-flex rounded-lg bg-white shadow">
|
| 71 |
+
<div id="analyzerTab" class="tab analyzer-bg text-white font-medium py-2 px-6 rounded-l-lg active">
|
| 72 |
+
<i class="fas fa-chart-bar mr-2"></i>Analyzer
|
| 73 |
+
</div>
|
| 74 |
+
<div id="humanizerTab" class="tab humanizer-bg text-white font-medium py-2 px-6 rounded-r-lg">
|
| 75 |
+
<i class="fas fa-user mr-2"></i>Humanizer
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
</div>
|
| 79 |
+
|
| 80 |
+
<!-- Analyzer Panel -->
|
| 81 |
+
<div id="analyzerPanel" class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
| 82 |
<!-- Input Section -->
|
| 83 |
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
|
| 84 |
+
<div class="analyzer-bg px-4 py-3">
|
| 85 |
<h2 class="text-lg font-semibold text-white">
|
| 86 |
<i class="fas fa-keyboard mr-2"></i> AI Text Input
|
| 87 |
</h2>
|
|
|
|
| 89 |
<div class="p-4 textarea-container">
|
| 90 |
<textarea
|
| 91 |
id="aiInput"
|
| 92 |
+
class="w-full h-64 p-4 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-300 resize-none"
|
| 93 |
placeholder="Paste your AI-generated text here..."></textarea>
|
| 94 |
<div id="inputWordCount" class="word-count">0 words</div>
|
| 95 |
</div>
|
| 96 |
+
<div class="px-4 pb-4">
|
| 97 |
+
<button
|
| 98 |
+
id="analyzeBtn"
|
| 99 |
+
class="w-full analyzer-bg hover:opacity-90 text-white font-bold py-3 px-6 rounded-lg shadow-lg transform transition-all duration-200 hover:scale-[1.01] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50">
|
| 100 |
+
<i class="fas fa-search mr-2"></i> Analyze Content
|
| 101 |
+
</button>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<!-- Analysis Results -->
|
| 106 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
|
| 107 |
+
<div class="analyzer-bg px-4 py-3">
|
| 108 |
+
<h2 class="text-lg font-semibold text-white">
|
| 109 |
+
<i class="fas fa-chart-pie mr-2"></i> Analysis Results
|
| 110 |
+
</h2>
|
| 111 |
+
</div>
|
| 112 |
+
<div class="p-4">
|
| 113 |
+
<div id="analysisPlaceholder" class="h-64 flex flex-col items-center justify-center text-gray-400">
|
| 114 |
+
<i class="fas fa-chart-bar text-4xl mb-4"></i>
|
| 115 |
+
<p>Your analysis results will appear here</p>
|
| 116 |
+
</div>
|
| 117 |
+
|
| 118 |
+
<div id="analysisResults" class="hidden">
|
| 119 |
+
<div class="mb-6">
|
| 120 |
+
<h3 class="font-semibold text-gray-700 mb-2">AI Detection Score</h3>
|
| 121 |
+
<div class="flex items-center mb-1">
|
| 122 |
+
<div class="w-full progress-bar">
|
| 123 |
+
<div id="aiScoreBar" class="progress-fill bg-red-500" style="width: 0%"></div>
|
| 124 |
+
</div>
|
| 125 |
+
<span id="aiScoreText" class="ml-3 font-bold text-gray-700">0%</span>
|
| 126 |
+
</div>
|
| 127 |
+
<p class="text-sm text-gray-500">Higher score indicates more detectable AI patterns</p>
|
| 128 |
+
</div>
|
| 129 |
+
|
| 130 |
+
<div class="mb-6">
|
| 131 |
+
<h3 class="font-semibold text-gray-700 mb-2">Human Likeness Score</h3>
|
| 132 |
+
<div class="flex items-center mb-1">
|
| 133 |
+
<div class="w-full progress-bar">
|
| 134 |
+
<div id="humanScoreBar" class="progress-fill bg-green-500" style="width: 0%"></div>
|
| 135 |
+
</div>
|
| 136 |
+
<span id="humanScoreText" class="ml-3 font-bold text-gray-700">0%</span>
|
| 137 |
+
</div>
|
| 138 |
+
<p class="text-sm text-gray-500">Higher score indicates more human-like qualities</p>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<div class="mb-4">
|
| 142 |
+
<h3 class="font-semibold text-gray-700 mb-2">Key Findings</h3>
|
| 143 |
+
<ul id="keyFindings" class="list-disc pl-5 space-y-1 text-gray-600">
|
| 144 |
+
<!-- Findings will be added here -->
|
| 145 |
+
</ul>
|
| 146 |
+
</div>
|
| 147 |
+
|
| 148 |
+
<div class="mt-6 pt-4 border-t border-gray-200">
|
| 149 |
+
<button
|
| 150 |
+
id="proceedToHumanizeBtn"
|
| 151 |
+
class="w-full humanizer-bg hover:opacity-90 text-white font-bold py-3 px-6 rounded-lg shadow-lg transform transition-all duration-200 hover:scale-[1.01] focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50">
|
| 152 |
+
<i class="fas fa-magic mr-2"></i> Humanize This Content
|
| 153 |
+
</button>
|
| 154 |
+
</div>
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
</div>
|
| 158 |
+
</div>
|
| 159 |
+
|
| 160 |
+
<!-- Humanizer Panel -->
|
| 161 |
+
<div id="humanizerPanel" class="hidden grid grid-cols-1 lg:grid-cols-2 gap-6">
|
| 162 |
+
<!-- Input Section -->
|
| 163 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
|
| 164 |
+
<div class="humanizer-bg px-4 py-3">
|
| 165 |
+
<h2 class="text-lg font-semibold text-white">
|
| 166 |
+
<i class="fas fa-keyboard mr-2"></i> Text to Humanize
|
| 167 |
+
</h2>
|
| 168 |
+
</div>
|
| 169 |
+
<div class="p-4 textarea-container">
|
| 170 |
+
<textarea
|
| 171 |
+
id="humanizerInput"
|
| 172 |
+
class="w-full h-64 p-4 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-300 resize-none"
|
| 173 |
+
placeholder="Text to humanize will appear here..."></textarea>
|
| 174 |
+
<div id="humanizerWordCount" class="word-count">0 words</div>
|
| 175 |
+
</div>
|
| 176 |
+
<div class="px-4 pb-4">
|
| 177 |
+
<button
|
| 178 |
+
id="humanizeBtn"
|
| 179 |
+
class="w-full humanizer-bg hover:opacity-90 text-white font-bold py-3 px-6 rounded-lg shadow-lg transform transition-all duration-200 hover:scale-[1.01] focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50">
|
| 180 |
+
<i class="fas fa-magic mr-2"></i> Humanize Text
|
| 181 |
+
</button>
|
| 182 |
+
</div>
|
| 183 |
</div>
|
| 184 |
|
| 185 |
<!-- Output Section -->
|
| 186 |
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
|
| 187 |
+
<div class="humanizer-bg px-4 py-3">
|
| 188 |
<h2 class="text-lg font-semibold text-white">
|
| 189 |
<i class="fas fa-user mr-2"></i> Humanized Output
|
| 190 |
</h2>
|
|
|
|
| 197 |
readonly></textarea>
|
| 198 |
<div id="outputWordCount" class="word-count">0 words</div>
|
| 199 |
</div>
|
| 200 |
+
<div class="px-4 pb-4">
|
| 201 |
+
<button
|
| 202 |
+
id="copyBtn"
|
| 203 |
+
class="w-full bg-gray-700 hover:bg-gray-800 text-white font-bold py-3 px-6 rounded-lg shadow-lg transform transition-all duration-200 hover:scale-[1.01] focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-opacity-50">
|
| 204 |
+
<i class="fas fa-copy mr-2"></i> Copy to Clipboard
|
| 205 |
+
</button>
|
| 206 |
+
</div>
|
| 207 |
</div>
|
| 208 |
</div>
|
| 209 |
|
| 210 |
+
<!-- Loading and Error Indicators -->
|
| 211 |
<div class="mt-4 text-center">
|
| 212 |
+
<div id="analyzerLoading" class="hidden">
|
| 213 |
+
<div class="inline-flex items-center analyzer-bg text-white py-2 px-4 rounded-full">
|
| 214 |
+
<div class="pulse">
|
| 215 |
+
<i class="fas fa-spinner fa-spin mr-2"></i>
|
| 216 |
+
</div>
|
| 217 |
+
<span>Analyzing content...</span>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
|
| 221 |
+
<div id="humanizerLoading" class="hidden">
|
| 222 |
+
<div class="inline-flex items-center humanizer-bg text-white py-2 px-4 rounded-full">
|
| 223 |
<div class="pulse">
|
| 224 |
<i class="fas fa-spinner fa-spin mr-2"></i>
|
| 225 |
</div>
|
| 226 |
+
<span>Humanizing content...</span>
|
| 227 |
</div>
|
| 228 |
</div>
|
| 229 |
|
|
|
|
| 238 |
|
| 239 |
<script>
|
| 240 |
document.addEventListener('DOMContentLoaded', function() {
|
| 241 |
+
// DOM Elements
|
| 242 |
const aiInput = document.getElementById('aiInput');
|
| 243 |
+
const humanizerInput = document.getElementById('humanizerInput');
|
| 244 |
const humanOutput = document.getElementById('humanOutput');
|
| 245 |
+
const analyzeBtn = document.getElementById('analyzeBtn');
|
| 246 |
+
const proceedToHumanizeBtn = document.getElementById('proceedToHumanizeBtn');
|
| 247 |
const humanizeBtn = document.getElementById('humanizeBtn');
|
| 248 |
+
const copyBtn = document.getElementById('copyBtn');
|
| 249 |
+
const analyzerLoading = document.getElementById('analyzerLoading');
|
| 250 |
+
const humanizerLoading = document.getElementById('humanizerLoading');
|
| 251 |
const errorMessage = document.getElementById('errorMessage');
|
| 252 |
const inputWordCount = document.getElementById('inputWordCount');
|
| 253 |
+
const humanizerWordCount = document.getElementById('humanizerWordCount');
|
| 254 |
const outputWordCount = document.getElementById('outputWordCount');
|
| 255 |
+
const analysisPlaceholder = document.getElementById('analysisPlaceholder');
|
| 256 |
+
const analysisResults = document.getElementById('analysisResults');
|
| 257 |
+
const aiScoreBar = document.getElementById('aiScoreBar');
|
| 258 |
+
const aiScoreText = document.getElementById('aiScoreText');
|
| 259 |
+
const humanScoreBar = document.getElementById('humanScoreBar');
|
| 260 |
+
const humanScoreText = document.getElementById('humanScoreText');
|
| 261 |
+
const keyFindings = document.getElementById('keyFindings');
|
| 262 |
+
const analyzerTab = document.getElementById('analyzerTab');
|
| 263 |
+
const humanizerTab = document.getElementById('humanizerTab');
|
| 264 |
+
const analyzerPanel = document.getElementById('analyzerPanel');
|
| 265 |
+
const humanizerPanel = document.getElementById('humanizerPanel');
|
| 266 |
+
|
| 267 |
+
// Tab Switching
|
| 268 |
+
analyzerTab.addEventListener('click', function() {
|
| 269 |
+
analyzerTab.classList.add('active');
|
| 270 |
+
humanizerTab.classList.remove('active');
|
| 271 |
+
analyzerPanel.classList.remove('hidden');
|
| 272 |
+
humanizerPanel.classList.add('hidden');
|
| 273 |
+
});
|
| 274 |
+
|
| 275 |
+
humanizerTab.addEventListener('click', function() {
|
| 276 |
+
if (humanizerInput.value.trim() === '') {
|
| 277 |
+
showError("Please analyze content first before humanizing");
|
| 278 |
+
return;
|
| 279 |
+
}
|
| 280 |
+
humanizerTab.classList.add('active');
|
| 281 |
+
analyzerTab.classList.remove('active');
|
| 282 |
+
analyzerPanel.classList.add('hidden');
|
| 283 |
+
humanizerPanel.classList.remove('hidden');
|
| 284 |
+
});
|
| 285 |
|
| 286 |
// Update word count for input
|
| 287 |
aiInput.addEventListener('input', function() {
|
|
|
|
| 290 |
inputWordCount.textContent = `${words} words`;
|
| 291 |
});
|
| 292 |
|
| 293 |
+
humanizerInput.addEventListener('input', function() {
|
| 294 |
+
const text = humanizerInput.value.trim();
|
| 295 |
+
const words = text ? text.split(/\s+/).length : 0;
|
| 296 |
+
humanizerWordCount.textContent = `${words} words`;
|
| 297 |
+
});
|
| 298 |
+
|
| 299 |
+
// Analyze button click handler
|
| 300 |
+
analyzeBtn.addEventListener('click', async function() {
|
| 301 |
+
const inputText = aiInput.value.trim();
|
| 302 |
+
|
| 303 |
+
if (!inputText) {
|
| 304 |
+
showError("Please enter some text to analyze.");
|
| 305 |
+
return;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
// Show loading, hide error
|
| 309 |
+
analyzerLoading.classList.remove('hidden');
|
| 310 |
+
errorMessage.classList.add('hidden');
|
| 311 |
+
analyzeBtn.disabled = true;
|
| 312 |
+
analyzeBtn.classList.add('opacity-75');
|
| 313 |
+
|
| 314 |
+
try {
|
| 315 |
+
// Simulate API call
|
| 316 |
+
const analysis = await simulateAnalysisApiCall(inputText);
|
| 317 |
+
|
| 318 |
+
// Display results
|
| 319 |
+
displayAnalysisResults(analysis);
|
| 320 |
+
|
| 321 |
+
// Populate humanizer input
|
| 322 |
+
humanizerInput.value = inputText;
|
| 323 |
+
const words = inputText ? inputText.split(/\s+/).length : 0;
|
| 324 |
+
humanizerWordCount.textContent = `${words} words`;
|
| 325 |
+
|
| 326 |
+
} catch (error) {
|
| 327 |
+
console.error("Error:", error);
|
| 328 |
+
showError("Failed to analyze text. Please try again later.");
|
| 329 |
+
} finally {
|
| 330 |
+
analyzerLoading.classList.add('hidden');
|
| 331 |
+
analyzeBtn.disabled = false;
|
| 332 |
+
analyzeBtn.classList.remove('opacity-75');
|
| 333 |
+
}
|
| 334 |
+
});
|
| 335 |
+
|
| 336 |
+
// Proceed to humanize button
|
| 337 |
+
proceedToHumanizeBtn.addEventListener('click', function() {
|
| 338 |
+
humanizerTab.click();
|
| 339 |
+
});
|
| 340 |
+
|
| 341 |
// Humanize button click handler
|
| 342 |
humanizeBtn.addEventListener('click', async function() {
|
| 343 |
+
const inputText = humanizerInput.value.trim();
|
| 344 |
|
| 345 |
if (!inputText) {
|
| 346 |
showError("Please enter some text to humanize.");
|
|
|
|
| 348 |
}
|
| 349 |
|
| 350 |
// Show loading, hide error
|
| 351 |
+
humanizerLoading.classList.remove('hidden');
|
| 352 |
errorMessage.classList.add('hidden');
|
| 353 |
humanizeBtn.disabled = true;
|
| 354 |
humanizeBtn.classList.add('opacity-75');
|
| 355 |
|
| 356 |
try {
|
| 357 |
+
// Simulate API call
|
| 358 |
const humanizedText = await simulateHumanizeApiCall(inputText);
|
| 359 |
|
| 360 |
humanOutput.value = humanizedText;
|
|
|
|
| 367 |
console.error("Error:", error);
|
| 368 |
showError("Failed to humanize text. Please try again later.");
|
| 369 |
} finally {
|
| 370 |
+
humanizerLoading.classList.add('hidden');
|
| 371 |
humanizeBtn.disabled = false;
|
| 372 |
humanizeBtn.classList.remove('opacity-75');
|
| 373 |
}
|
| 374 |
});
|
| 375 |
|
| 376 |
+
// Copy button click handler
|
| 377 |
+
copyBtn.addEventListener('click', function() {
|
| 378 |
+
if (humanOutput.value) {
|
| 379 |
+
humanOutput.select();
|
| 380 |
+
document.execCommand('copy');
|
| 381 |
+
|
| 382 |
+
// Show temporary tooltip
|
| 383 |
+
const tooltip = document.createElement('div');
|
| 384 |
+
tooltip.className = 'fixed bg-gray-800 text-white px-3 py-1 rounded text-sm';
|
| 385 |
+
tooltip.textContent = 'Copied!';
|
| 386 |
+
tooltip.style.top = (event.pageY - 40) + 'px';
|
| 387 |
+
tooltip.style.left = (event.pageX - 30) + 'px';
|
| 388 |
+
document.body.appendChild(tooltip);
|
| 389 |
+
|
| 390 |
+
setTimeout(() => {
|
| 391 |
+
document.body.removeChild(tooltip);
|
| 392 |
+
}, 1000);
|
| 393 |
+
}
|
| 394 |
+
});
|
| 395 |
+
|
| 396 |
+
// Function to display analysis results
|
| 397 |
+
function displayAnalysisResults(analysis) {
|
| 398 |
+
analysisPlaceholder.classList.add('hidden');
|
| 399 |
+
analysisResults.classList.remove('hidden');
|
| 400 |
+
|
| 401 |
+
// Animate progress bars
|
| 402 |
+
setTimeout(() => {
|
| 403 |
+
aiScoreBar.style.width = `${analysis.aiScore}%`;
|
| 404 |
+
humanScoreBar.style.width = `${analysis.humanScore}%`;
|
| 405 |
+
aiScoreText.textContent = `${analysis.aiScore}%`;
|
| 406 |
+
humanScoreText.textContent = `${analysis.humanScore}%`;
|
| 407 |
+
}, 100);
|
| 408 |
+
|
| 409 |
+
// Add key findings
|
| 410 |
+
keyFindings.innerHTML = '';
|
| 411 |
+
analysis.findings.forEach(finding => {
|
| 412 |
+
const li = document.createElement('li');
|
| 413 |
+
li.textContent = finding;
|
| 414 |
+
keyFindings.appendChild(li);
|
| 415 |
+
});
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
// Function to simulate analysis API call
|
| 419 |
+
async function simulateAnalysisApiCall(text) {
|
| 420 |
+
// Simulate network delay
|
| 421 |
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
| 422 |
+
|
| 423 |
+
// Calculate some fake metrics based on text characteristics
|
| 424 |
+
const wordCount = text.split(/\s+/).length;
|
| 425 |
+
const sentenceCount = text.split(/[.!?]+/).filter(s => s.trim().length > 0).length;
|
| 426 |
+
const avgSentenceLength = wordCount / sentenceCount;
|
| 427 |
+
const aiKeywords = ['artificial intelligence', 'machine learning', 'algorithm', 'neural network', 'AI model'];
|
| 428 |
+
|
| 429 |
+
// Calculate AI score (0-100)
|
| 430 |
+
let aiScore = 0;
|
| 431 |
+
|
| 432 |
+
// Score based on AI keywords
|
| 433 |
+
aiKeywords.forEach(keyword => {
|
| 434 |
+
if (text.toLowerCase().includes(keyword)) {
|
| 435 |
+
aiScore += 15;
|
| 436 |
+
}
|
| 437 |
+
});
|
| 438 |
+
|
| 439 |
+
// Score based on sentence length variation
|
| 440 |
+
if (avgSentenceLength > 18 || avgSentenceLength < 8) {
|
| 441 |
+
aiScore += 20;
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
// Score based on certain patterns
|
| 445 |
+
if (text.includes("However,") || text.includes("Furthermore,") || text.includes("Moreover,")) {
|
| 446 |
+
aiScore += 15;
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
// Cap at 100
|
| 450 |
+
aiScore = Math.min(100, Math.max(0, aiScore));
|
| 451 |
+
|
| 452 |
+
// Human score is inverse of AI score with some randomness
|
| 453 |
+
const humanScore = Math.min(100, Math.max(0, 100 - aiScore + (Math.random() * 20 - 10)));
|
| 454 |
+
|
| 455 |
+
// Generate findings
|
| 456 |
+
const findings = [];
|
| 457 |
+
|
| 458 |
+
if (aiScore > 70) {
|
| 459 |
+
findings.push("Highly likely to be AI-generated content");
|
| 460 |
+
findings.push("Contains multiple AI-related keywords");
|
| 461 |
+
findings.push("Sentence structure shows repetitive patterns");
|
| 462 |
+
} else if (aiScore > 40) {
|
| 463 |
+
findings.push("Likely contains some AI-generated elements");
|
| 464 |
+
findings.push("Some sentences show unnatural patterns");
|
| 465 |
+
findings.push("Could benefit from more human-like variations");
|
| 466 |
+
} else {
|
| 467 |
+
findings.push("Content appears mostly human-like");
|
| 468 |
+
findings.push("Few detectable AI patterns found");
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
if (avgSentenceLength > 20) {
|
| 472 |
+
findings.push("Some sentences are unusually long");
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
if (text.split(/[.!?]+/).length < 3 && wordCount > 50) {
|
| 476 |
+
findings.push("Low sentence variation detected");
|
| 477 |
+
}
|
| 478 |
+
|
| 479 |
+
return {
|
| 480 |
+
aiScore: Math.round(aiScore),
|
| 481 |
+
humanScore: Math.round(humanScore),
|
| 482 |
+
findings: findings
|
| 483 |
+
};
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
// Function to simulate humanize API call
|
| 487 |
async function simulateHumanizeApiCall(text) {
|
| 488 |
// Simulate network delay
|
| 489 |
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
|
|
| 498 |
.replace(/\bthus\b/gi, 'so')
|
| 499 |
.replace(/\bhence\b/gi, 'that\'s why')
|
| 500 |
.replace(/\bnevertheless\b/gi, 'still')
|
| 501 |
+
.replace(/\bconsequently\b/gi, 'as a result')
|
| 502 |
+
.replace(/\bin conclusion\b/gi, 'to wrap things up')
|
| 503 |
+
.replace(/\badditionally\b/gi, 'on top of that')
|
| 504 |
+
.replace(/\butilize\b/gi, 'use')
|
| 505 |
+
.replace(/\bcommence\b/gi, 'start')
|
| 506 |
+
.replace(/\bterminate\b/gi, 'end')
|
| 507 |
+
.replace(/\boptimal\b/gi, 'best')
|
| 508 |
+
.replace(/\bendeavor\b/gi, 'try')
|
| 509 |
+
.replace(/\bascertain\b/gi, 'find out')
|
| 510 |
+
.replace(/\bameliorate\b/gi, 'improve');
|
| 511 |
}
|
| 512 |
|
| 513 |
function showError(message) {
|
| 514 |
errorText.textContent = message;
|
| 515 |
errorMessage.classList.remove('hidden');
|
| 516 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 517 |
});
|
| 518 |
</script>
|
| 519 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=sqibhe/humanizer" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
prompts.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
Objective: Build a client-side web tool that sends user-inputted AI-generated text directly to the DeepSeek API and displays the humanized response in a second text box. Requirements Frontend: Simple HTML/CSS/JS interface with two text areas (input/output). A "Humanize" button to trigger the API request. Loading indicator during processing. Error handling for API failures. DeepSeek Integration: Direct API call to DeepSeek’s /v1/chat/completions endpoint. System prompt: "Rewrite this text to sound like a human wrote it. Use casual language, vary sentence structure, and avoid repetitive phrases. Keep technical terms intact." Include the user’s input text in the request. Security: Use a serverless proxy (e.g., Cloudflare Worker/Netlify Function) to hide the DeepSeek API key. Deployment: Host the static frontend on Netlify/Vercel. Deploy the proxy alongside the frontend.
|
| 2 |
-
OKay Remove everything expect the tool from this page.
|
|
|
|
|
|
| 1 |
Objective: Build a client-side web tool that sends user-inputted AI-generated text directly to the DeepSeek API and displays the humanized response in a second text box. Requirements Frontend: Simple HTML/CSS/JS interface with two text areas (input/output). A "Humanize" button to trigger the API request. Loading indicator during processing. Error handling for API failures. DeepSeek Integration: Direct API call to DeepSeek’s /v1/chat/completions endpoint. System prompt: "Rewrite this text to sound like a human wrote it. Use casual language, vary sentence structure, and avoid repetitive phrases. Keep technical terms intact." Include the user’s input text in the request. Security: Use a serverless proxy (e.g., Cloudflare Worker/Netlify Function) to hide the DeepSeek API key. Deployment: Host the static frontend on Netlify/Vercel. Deploy the proxy alongside the frontend.
|
| 2 |
+
OKay Remove everything expect the tool from this page.
|
| 3 |
+
Okay Expand this tool with Analysis as well, First our AI Text Input Should ask for the analyze and rate content for AI scale then Ask to convert it into hummonid content.
|