Add 2 files
Browse files- index.html +189 -116
- prompts.txt +2 -1
index.html
CHANGED
|
@@ -137,10 +137,63 @@
|
|
| 137 |
visibility: visible;
|
| 138 |
opacity: 1;
|
| 139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
</style>
|
| 141 |
</head>
|
| 142 |
<body class="min-h-screen bg-gray-50 p-4">
|
| 143 |
<div class="max-w-6xl mx-auto">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
<div class="text-center mb-8">
|
| 145 |
<h1 class="text-3xl font-bold text-gray-800 mb-2">Advanced AI Content Analyzer & Humanizer</h1>
|
| 146 |
<p class="text-gray-600">Comprehensive analysis of AI-generated content with detailed metrics and humanization</p>
|
|
@@ -525,6 +578,50 @@
|
|
| 525 |
const personalBar = document.getElementById('personalBar');
|
| 526 |
const humanizeLevel = document.getElementById('humanizeLevel');
|
| 527 |
const targetTone = document.getElementById('targetTone');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 528 |
|
| 529 |
// Tab Switching
|
| 530 |
analyzerTab.addEventListener('click', function() {
|
|
@@ -610,6 +707,13 @@
|
|
| 610 |
showError("Please enter some text to humanize.");
|
| 611 |
return;
|
| 612 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 613 |
|
| 614 |
// Show loading, hide error
|
| 615 |
humanizerLoading.classList.remove('hidden');
|
|
@@ -618,18 +722,22 @@
|
|
| 618 |
humanizeBtn.classList.add('opacity-75');
|
| 619 |
|
| 620 |
try {
|
| 621 |
-
//
|
| 622 |
-
const humanizedText = await
|
| 623 |
-
|
| 624 |
-
humanOutput.value = humanizedText;
|
| 625 |
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 629 |
|
| 630 |
} catch (error) {
|
| 631 |
console.error("Error:", error);
|
| 632 |
-
showError("Failed to humanize text. Please try again
|
| 633 |
} finally {
|
| 634 |
humanizerLoading.classList.add('hidden');
|
| 635 |
humanizeBtn.disabled = false;
|
|
@@ -670,6 +778,65 @@
|
|
| 670 |
}
|
| 671 |
});
|
| 672 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 673 |
// Function to display analysis results
|
| 674 |
function displayAnalysisResults(analysis) {
|
| 675 |
analysisPlaceholder.classList.add('hidden');
|
|
@@ -973,114 +1140,6 @@
|
|
| 973 |
};
|
| 974 |
}
|
| 975 |
|
| 976 |
-
// Function to simulate humanize API call with options
|
| 977 |
-
async function simulateHumanizeApiCall(text, level = 'medium', tone = 'neutral') {
|
| 978 |
-
// Simulate network delay
|
| 979 |
-
await new Promise(resolve => setTimeout(resolve, 2500));
|
| 980 |
-
|
| 981 |
-
// Apply transformations based on level and tone
|
| 982 |
-
let result = text;
|
| 983 |
-
|
| 984 |
-
// Level transformations
|
| 985 |
-
if (level === 'heavy') {
|
| 986 |
-
// Heavy transformation - complete rewrite
|
| 987 |
-
const sentences = result.split(/[.!?]+/);
|
| 988 |
-
result = sentences.map((sentence, i) => {
|
| 989 |
-
if (i % 3 === 0) return `You know, ${sentence.trim().toLowerCase()}`;
|
| 990 |
-
if (i % 4 === 0) return `Honestly, ${sentence.trim()}`;
|
| 991 |
-
if (i % 5 === 0) return `Personally, I think ${sentence.trim().toLowerCase()}`;
|
| 992 |
-
return sentence.trim();
|
| 993 |
-
}).join('. ') + (text.endsWith('.') ? '.' : '');
|
| 994 |
-
|
| 995 |
-
// Add more casual replacements
|
| 996 |
-
result = result.replace(/\bHowever\b/gi, 'But')
|
| 997 |
-
.replace(/\bFurthermore\b/gi, 'Also')
|
| 998 |
-
.replace(/\bMoreover\b/gi, 'What\'s more')
|
| 999 |
-
.replace(/\bThus\b/gi, 'So')
|
| 1000 |
-
.replace(/\bHence\b/gi, 'That\'s why')
|
| 1001 |
-
.replace(/\bNevertheless\b/gi, 'Still')
|
| 1002 |
-
.replace(/\bConsequently\b/gi, 'As a result')
|
| 1003 |
-
.replace(/\bIn conclusion\b/gi, 'To wrap things up')
|
| 1004 |
-
.replace(/\bAdditionally\b/gi, 'On top of that')
|
| 1005 |
-
.replace(/\bUtilize\b/gi, 'Use')
|
| 1006 |
-
.replace(/\bCommence\b/gi, 'Start')
|
| 1007 |
-
.replace(/\bTerminate\b/gi, 'End')
|
| 1008 |
-
.replace(/\bOptimal\b/gi, 'Best')
|
| 1009 |
-
.replace(/\bEndeavor\b/gi, 'Try')
|
| 1010 |
-
.replace(/\bAscertain\b/gi, 'Find out')
|
| 1011 |
-
.replace(/\bAmeliorate\b/gi, 'Improve')
|
| 1012 |
-
.replace(/\bIt is important to note that\b/gi, 'Remember that')
|
| 1013 |
-
.replace(/\bIn order to\b/gi, 'To')
|
| 1014 |
-
.replace(/\bWith regard to\b/gi, 'About')
|
| 1015 |
-
.replace(/\bAt this point in time\b/gi, 'Now')
|
| 1016 |
-
.replace(/\bDue to the fact that\b/gi, 'Because');
|
| 1017 |
-
} else if (level === 'medium') {
|
| 1018 |
-
// Medium transformation - balanced approach
|
| 1019 |
-
result = result.replace(/\bHowever\b/gi, 'But')
|
| 1020 |
-
.replace(/\bFurthermore\b/gi, 'Also')
|
| 1021 |
-
.replace(/\bMoreover\b/gi, 'Additionally')
|
| 1022 |
-
.replace(/\bThus\b/gi, 'So')
|
| 1023 |
-
.replace(/\bHence\b/gi, 'Therefore')
|
| 1024 |
-
.replace(/\bNevertheless\b/gi, 'Still')
|
| 1025 |
-
.replace(/\bConsequently\b/gi, 'As a result')
|
| 1026 |
-
.replace(/\bIn conclusion\b/gi, 'In summary')
|
| 1027 |
-
.replace(/\bUtilize\b/gi, 'Use')
|
| 1028 |
-
.replace(/\bCommence\b/gi, 'Begin')
|
| 1029 |
-
.replace(/\bTerminate\b/gi, 'End')
|
| 1030 |
-
.replace(/\bOptimal\b/gi, 'Best')
|
| 1031 |
-
.replace(/\bEndeavor\b/gi, 'Try')
|
| 1032 |
-
.replace(/\bAscertain\b/gi, 'Determine')
|
| 1033 |
-
.replace(/\bAmeliorate\b/gi, 'Improve')
|
| 1034 |
-
.replace(/\bIt is important to note that\b/gi, 'Note that')
|
| 1035 |
-
.replace(/\bIn order to\b/gi, 'To')
|
| 1036 |
-
.replace(/\bWith regard to\b/gi, 'Regarding')
|
| 1037 |
-
.replace(/\bAt this point in time\b/gi, 'Currently')
|
| 1038 |
-
.replace(/\bDue to the fact that\b/gi, 'Because');
|
| 1039 |
-
} else {
|
| 1040 |
-
// Light transformation - minimal changes
|
| 1041 |
-
result = result.replace(/\bUtilize\b/gi, 'Use')
|
| 1042 |
-
.replace(/\bCommence\b/gi, 'Begin')
|
| 1043 |
-
.replace(/\bTerminate\b/gi, 'End')
|
| 1044 |
-
.replace(/\bOptimal\b/gi, 'Best')
|
| 1045 |
-
.replace(/\bEndeavor\b/gi, 'Try')
|
| 1046 |
-
.replace(/\bAscertain\b/gi, 'Determine')
|
| 1047 |
-
.replace(/\bAmeliorate\b/gi, 'Improve');
|
| 1048 |
-
}
|
| 1049 |
-
|
| 1050 |
-
// Tone transformations
|
| 1051 |
-
if (tone === 'casual') {
|
| 1052 |
-
result = result.replace(/\bHowever\b/gi, 'But')
|
| 1053 |
-
.replace(/\bTherefore\b/gi, 'So')
|
| 1054 |
-
.replace(/\bAdditionally\b/gi, 'Also')
|
| 1055 |
-
.replace(/\bIn summary\b/gi, 'To sum up')
|
| 1056 |
-
.replace(/\bIt should be noted that\b/gi, 'Keep in mind that')
|
| 1057 |
-
.replace(/\bThis demonstrates that\b/gi, 'This shows that');
|
| 1058 |
-
} else if (tone === 'professional') {
|
| 1059 |
-
result = result.replace(/\bBut\b/gi, 'However')
|
| 1060 |
-
.replace(/\bSo\b/gi, 'Therefore')
|
| 1061 |
-
.replace(/\bAlso\b/gi, 'Additionally')
|
| 1062 |
-
.replace(/\bTo sum up\b/gi, 'In conclusion')
|
| 1063 |
-
.replace(/\bKeep in mind that\b/gi, 'It should be noted that')
|
| 1064 |
-
.replace(/\bThis shows that\b/gi, 'This demonstrates that');
|
| 1065 |
-
} else if (tone === 'friendly') {
|
| 1066 |
-
result = result.replace(/\bHowever\b/gi, 'But')
|
| 1067 |
-
.replace(/\bTherefore\b/gi, 'So')
|
| 1068 |
-
.replace(/\bAdditionally\b/gi, 'Also')
|
| 1069 |
-
.replace(/\bIn summary\b/gi, 'To wrap things up')
|
| 1070 |
-
.replace(/\bIt should be noted that\b/gi, 'Just remember that')
|
| 1071 |
-
.replace(/\bThis demonstrates that\b/gi, 'This shows that');
|
| 1072 |
-
} else if (tone === 'academic') {
|
| 1073 |
-
result = result.replace(/\bBut\b/gi, 'However')
|
| 1074 |
-
.replace(/\bSo\b/gi, 'Thus')
|
| 1075 |
-
.replace(/\bAlso\b/gi, 'Furthermore')
|
| 1076 |
-
.replace(/\bTo sum up\b/gi, 'In conclusion')
|
| 1077 |
-
.replace(/\bKeep in mind that\b/gi, 'It is important to note that')
|
| 1078 |
-
.replace(/\bThis shows that\b/gi, 'This demonstrates that');
|
| 1079 |
-
}
|
| 1080 |
-
|
| 1081 |
-
return result;
|
| 1082 |
-
}
|
| 1083 |
-
|
| 1084 |
// Helper function to calculate variation coefficient
|
| 1085 |
function calculateVariation(values) {
|
| 1086 |
if (values.length < 2) return 0;
|
|
@@ -1124,6 +1183,20 @@
|
|
| 1124 |
errorText.textContent = message;
|
| 1125 |
errorMessage.classList.remove('hidden');
|
| 1126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1127 |
});
|
| 1128 |
</script>
|
| 1129 |
<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>
|
|
|
|
| 137 |
visibility: visible;
|
| 138 |
opacity: 1;
|
| 139 |
}
|
| 140 |
+
.settings-panel {
|
| 141 |
+
transition: all 0.3s ease;
|
| 142 |
+
max-height: 0;
|
| 143 |
+
overflow: hidden;
|
| 144 |
+
}
|
| 145 |
+
.settings-panel.open {
|
| 146 |
+
max-height: 500px;
|
| 147 |
+
}
|
| 148 |
</style>
|
| 149 |
</head>
|
| 150 |
<body class="min-h-screen bg-gray-50 p-4">
|
| 151 |
<div class="max-w-6xl mx-auto">
|
| 152 |
+
<!-- Settings Panel -->
|
| 153 |
+
<div class="bg-white rounded-xl shadow-lg mb-6 overflow-hidden">
|
| 154 |
+
<div class="gradient-bg px-4 py-3 flex justify-between items-center cursor-pointer" id="settingsToggle">
|
| 155 |
+
<h2 class="text-lg font-semibold text-white">
|
| 156 |
+
<i class="fas fa-cog mr-2"></i> API Settings
|
| 157 |
+
</h2>
|
| 158 |
+
<i class="fas fa-chevron-down text-white transition-transform duration-300" id="settingsIcon"></i>
|
| 159 |
+
</div>
|
| 160 |
+
<div class="settings-panel" id="settingsPanel">
|
| 161 |
+
<div class="p-4">
|
| 162 |
+
<div class="mb-4">
|
| 163 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">DeepSeek API Key</label>
|
| 164 |
+
<input
|
| 165 |
+
type="password"
|
| 166 |
+
id="apiKeyInput"
|
| 167 |
+
class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
| 168 |
+
placeholder="Enter your DeepSeek API key">
|
| 169 |
+
<p class="text-xs text-gray-500 mt-1">Your API key is stored locally in your browser and never sent to our servers.</p>
|
| 170 |
+
</div>
|
| 171 |
+
<div class="mb-4">
|
| 172 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">API Endpoint</label>
|
| 173 |
+
<input
|
| 174 |
+
type="text"
|
| 175 |
+
id="apiEndpointInput"
|
| 176 |
+
class="w-full border border-gray-300 rounded-md py-2 px-3 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
| 177 |
+
value="https://api.deepseek.com/v1"
|
| 178 |
+
placeholder="https://api.deepseek.com/v1">
|
| 179 |
+
</div>
|
| 180 |
+
<div class="flex justify-between items-center">
|
| 181 |
+
<div>
|
| 182 |
+
<label class="inline-flex items-center">
|
| 183 |
+
<input type="checkbox" id="saveSettingsCheckbox" class="rounded border-gray-300 text-blue-600 shadow-sm focus:border-blue-300 focus:ring focus:ring-blue-200 focus:ring-opacity-50" checked>
|
| 184 |
+
<span class="ml-2 text-sm text-gray-700">Remember settings</span>
|
| 185 |
+
</label>
|
| 186 |
+
</div>
|
| 187 |
+
<button
|
| 188 |
+
id="saveSettingsBtn"
|
| 189 |
+
class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-md shadow-sm">
|
| 190 |
+
Save Settings
|
| 191 |
+
</button>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
|
| 197 |
<div class="text-center mb-8">
|
| 198 |
<h1 class="text-3xl font-bold text-gray-800 mb-2">Advanced AI Content Analyzer & Humanizer</h1>
|
| 199 |
<p class="text-gray-600">Comprehensive analysis of AI-generated content with detailed metrics and humanization</p>
|
|
|
|
| 578 |
const personalBar = document.getElementById('personalBar');
|
| 579 |
const humanizeLevel = document.getElementById('humanizeLevel');
|
| 580 |
const targetTone = document.getElementById('targetTone');
|
| 581 |
+
const settingsToggle = document.getElementById('settingsToggle');
|
| 582 |
+
const settingsPanel = document.getElementById('settingsPanel');
|
| 583 |
+
const settingsIcon = document.getElementById('settingsIcon');
|
| 584 |
+
const apiKeyInput = document.getElementById('apiKeyInput');
|
| 585 |
+
const apiEndpointInput = document.getElementById('apiEndpointInput');
|
| 586 |
+
const saveSettingsCheckbox = document.getElementById('saveSettingsCheckbox');
|
| 587 |
+
const saveSettingsBtn = document.getElementById('saveSettingsBtn');
|
| 588 |
+
|
| 589 |
+
// Settings panel toggle
|
| 590 |
+
settingsToggle.addEventListener('click', function() {
|
| 591 |
+
settingsPanel.classList.toggle('open');
|
| 592 |
+
settingsIcon.classList.toggle('rotate-180');
|
| 593 |
+
});
|
| 594 |
+
|
| 595 |
+
// Load saved settings
|
| 596 |
+
function loadSettings() {
|
| 597 |
+
const savedSettings = localStorage.getItem('deepseekSettings');
|
| 598 |
+
if (savedSettings) {
|
| 599 |
+
const settings = JSON.parse(savedSettings);
|
| 600 |
+
apiKeyInput.value = settings.apiKey || '';
|
| 601 |
+
apiEndpointInput.value = settings.apiEndpoint || 'https://api.deepseek.com/v1';
|
| 602 |
+
saveSettingsCheckbox.checked = settings.saveSettings !== false;
|
| 603 |
+
}
|
| 604 |
+
}
|
| 605 |
+
|
| 606 |
+
// Save settings
|
| 607 |
+
saveSettingsBtn.addEventListener('click', function() {
|
| 608 |
+
const settings = {
|
| 609 |
+
apiKey: apiKeyInput.value,
|
| 610 |
+
apiEndpoint: apiEndpointInput.value,
|
| 611 |
+
saveSettings: saveSettingsCheckbox.checked
|
| 612 |
+
};
|
| 613 |
+
|
| 614 |
+
if (saveSettingsCheckbox.checked) {
|
| 615 |
+
localStorage.setItem('deepseekSettings', JSON.stringify(settings));
|
| 616 |
+
} else {
|
| 617 |
+
localStorage.removeItem('deepseekSettings');
|
| 618 |
+
}
|
| 619 |
+
|
| 620 |
+
showSuccess("Settings saved successfully!");
|
| 621 |
+
});
|
| 622 |
+
|
| 623 |
+
// Load settings on page load
|
| 624 |
+
loadSettings();
|
| 625 |
|
| 626 |
// Tab Switching
|
| 627 |
analyzerTab.addEventListener('click', function() {
|
|
|
|
| 707 |
showError("Please enter some text to humanize.");
|
| 708 |
return;
|
| 709 |
}
|
| 710 |
+
|
| 711 |
+
// Check if API key is provided
|
| 712 |
+
const apiKey = apiKeyInput.value.trim();
|
| 713 |
+
if (!apiKey) {
|
| 714 |
+
showError("Please enter your DeepSeek API key in the settings panel.");
|
| 715 |
+
return;
|
| 716 |
+
}
|
| 717 |
|
| 718 |
// Show loading, hide error
|
| 719 |
humanizerLoading.classList.remove('hidden');
|
|
|
|
| 722 |
humanizeBtn.classList.add('opacity-75');
|
| 723 |
|
| 724 |
try {
|
| 725 |
+
// Call DeepSeek API to humanize text
|
| 726 |
+
const humanizedText = await callDeepSeekApi(inputText, level, tone, apiKey);
|
|
|
|
|
|
|
| 727 |
|
| 728 |
+
if (humanizedText) {
|
| 729 |
+
humanOutput.value = humanizedText;
|
| 730 |
+
|
| 731 |
+
// Update output word count
|
| 732 |
+
const words = humanizedText ? humanizedText.split(/\s+/).length : 0;
|
| 733 |
+
outputWordCount.textContent = `${words} words`;
|
| 734 |
+
} else {
|
| 735 |
+
showError("Failed to humanize text. No response from API.");
|
| 736 |
+
}
|
| 737 |
|
| 738 |
} catch (error) {
|
| 739 |
console.error("Error:", error);
|
| 740 |
+
showError("Failed to humanize text. Please check your API key and try again.");
|
| 741 |
} finally {
|
| 742 |
humanizerLoading.classList.add('hidden');
|
| 743 |
humanizeBtn.disabled = false;
|
|
|
|
| 778 |
}
|
| 779 |
});
|
| 780 |
|
| 781 |
+
// Function to call DeepSeek API
|
| 782 |
+
async function callDeepSeekApi(text, level, tone, apiKey) {
|
| 783 |
+
const endpoint = apiEndpointInput.value.trim() || 'https://api.deepseek.com/v1';
|
| 784 |
+
|
| 785 |
+
// Prepare the prompt based on level and tone
|
| 786 |
+
let prompt = `Please humanize the following text to make it sound more natural and less like AI-generated content. `;
|
| 787 |
+
|
| 788 |
+
if (level === 'light') {
|
| 789 |
+
prompt += `Make subtle changes only, keeping most of the original structure intact. `;
|
| 790 |
+
} else if (level === 'medium') {
|
| 791 |
+
prompt += `Make balanced changes, improving flow and naturalness while preserving the core meaning. `;
|
| 792 |
+
} else if (level === 'heavy') {
|
| 793 |
+
prompt += `Completely rewrite the text to make it sound entirely human-written, using more varied sentence structures and natural phrasing. `;
|
| 794 |
+
}
|
| 795 |
+
|
| 796 |
+
if (tone === 'casual') {
|
| 797 |
+
prompt += `Use a casual, conversational tone. `;
|
| 798 |
+
} else if (tone === 'professional') {
|
| 799 |
+
prompt += `Use a professional, formal tone. `;
|
| 800 |
+
} else if (tone === 'friendly') {
|
| 801 |
+
prompt += `Use a friendly, approachable tone. `;
|
| 802 |
+
} else if (tone === 'academic') {
|
| 803 |
+
prompt += `Use an academic, scholarly tone. `;
|
| 804 |
+
} else {
|
| 805 |
+
prompt += `Use a neutral tone. `;
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
prompt += `Here's the text to humanize:\n\n${text}`;
|
| 809 |
+
|
| 810 |
+
const requestBody = {
|
| 811 |
+
model: "deepseek-chat",
|
| 812 |
+
messages: [
|
| 813 |
+
{
|
| 814 |
+
role: "user",
|
| 815 |
+
content: prompt
|
| 816 |
+
}
|
| 817 |
+
],
|
| 818 |
+
temperature: 0.7,
|
| 819 |
+
max_tokens: 2000
|
| 820 |
+
};
|
| 821 |
+
|
| 822 |
+
const response = await fetch(`${endpoint}/chat/completions`, {
|
| 823 |
+
method: 'POST',
|
| 824 |
+
headers: {
|
| 825 |
+
'Content-Type': 'application/json',
|
| 826 |
+
'Authorization': `Bearer ${apiKey}`
|
| 827 |
+
},
|
| 828 |
+
body: JSON.stringify(requestBody)
|
| 829 |
+
});
|
| 830 |
+
|
| 831 |
+
if (!response.ok) {
|
| 832 |
+
const errorData = await response.json();
|
| 833 |
+
throw new Error(errorData.error?.message || 'API request failed');
|
| 834 |
+
}
|
| 835 |
+
|
| 836 |
+
const data = await response.json();
|
| 837 |
+
return data.choices?.[0]?.message?.content || '';
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
// Function to display analysis results
|
| 841 |
function displayAnalysisResults(analysis) {
|
| 842 |
analysisPlaceholder.classList.add('hidden');
|
|
|
|
| 1140 |
};
|
| 1141 |
}
|
| 1142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1143 |
// Helper function to calculate variation coefficient
|
| 1144 |
function calculateVariation(values) {
|
| 1145 |
if (values.length < 2) return 0;
|
|
|
|
| 1183 |
errorText.textContent = message;
|
| 1184 |
errorMessage.classList.remove('hidden');
|
| 1185 |
}
|
| 1186 |
+
|
| 1187 |
+
function showSuccess(message) {
|
| 1188 |
+
const successDiv = document.createElement('div');
|
| 1189 |
+
successDiv.className = 'fixed bottom-4 right-4 bg-green-500 text-white px-4 py-2 rounded-md shadow-lg flex items-center';
|
| 1190 |
+
successDiv.innerHTML = `
|
| 1191 |
+
<i class="fas fa-check-circle mr-2"></i>
|
| 1192 |
+
<span>${message}</span>
|
| 1193 |
+
`;
|
| 1194 |
+
document.body.appendChild(successDiv);
|
| 1195 |
+
|
| 1196 |
+
setTimeout(() => {
|
| 1197 |
+
document.body.removeChild(successDiv);
|
| 1198 |
+
}, 3000);
|
| 1199 |
+
}
|
| 1200 |
});
|
| 1201 |
</script>
|
| 1202 |
<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,4 +1,5 @@
|
|
| 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.
|
| 4 |
-
Implement all of these standard to Analyze Content 2. Manual Detection Strategies Textual Red Flags Repetitive Phrasing: AI often reuses phrases (e.g., "It is important to note...") or synonyms in clusters. Overly Formal Tone: Unnatural formality in casual contexts (e.g., "utilize" instead of "use"). Lack of Personal Experience: No subjective anecdotes or emotional depth. Perfect Grammar: Fewer typos or colloquial errors compared to human writing. Vague Generalizations: Statements like "AI is revolutionizing many industries" without specifics. Structural Patterns Sentence Uniformity: Similar sentence lengths and structures. Passive Voice Overuse: Common in GPT-3.5/4 outputs. "Listicle" Format: AI defaults to bullet points or numbered lists when unsure. 3. Technical Analysis Perplexity & Burstiness Perplexity: Measures how "surprised" an AI model is by the text. AI text: Low perplexity (predictable word choices). Human text: High perplexity (unexpected phrasing). Burstiness: Variation in sentence length/complexity. AI text often has uniform burstiness scores. Watermarking (For Developers) Some AI models embed hidden statistical patterns (e.g., GPT-4). Tools like: GLTR (Giant Language Model Test Room): Visualizes word predictability. Sapling.ai Detector: Highlights likely AI-generated sections. 4. Hybrid Approaches Cross-Check with Metadata: Analyze document history (e.g., Google Docs version tracking for edits). Stylometric Analysis: Compare to the author’s known writing style. Fact-Checking: AI may hallucinate fake citations or outdated facts. 5. Limitations & Challenges False Positives: Human-written technical/scientific content can be flagged as AI. False Negatives: Advanced models (e.g., GPT-4o) mimic human writing better. Ethical Concerns: Tools like Turnitin face criticism for privacy issues.
|
|
|
|
|
|
| 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.
|
| 4 |
+
Implement all of these standard to Analyze Content 2. Manual Detection Strategies Textual Red Flags Repetitive Phrasing: AI often reuses phrases (e.g., "It is important to note...") or synonyms in clusters. Overly Formal Tone: Unnatural formality in casual contexts (e.g., "utilize" instead of "use"). Lack of Personal Experience: No subjective anecdotes or emotional depth. Perfect Grammar: Fewer typos or colloquial errors compared to human writing. Vague Generalizations: Statements like "AI is revolutionizing many industries" without specifics. Structural Patterns Sentence Uniformity: Similar sentence lengths and structures. Passive Voice Overuse: Common in GPT-3.5/4 outputs. "Listicle" Format: AI defaults to bullet points or numbered lists when unsure. 3. Technical Analysis Perplexity & Burstiness Perplexity: Measures how "surprised" an AI model is by the text. AI text: Low perplexity (predictable word choices). Human text: High perplexity (unexpected phrasing). Burstiness: Variation in sentence length/complexity. AI text often has uniform burstiness scores. Watermarking (For Developers) Some AI models embed hidden statistical patterns (e.g., GPT-4). Tools like: GLTR (Giant Language Model Test Room): Visualizes word predictability. Sapling.ai Detector: Highlights likely AI-generated sections. 4. Hybrid Approaches Cross-Check with Metadata: Analyze document history (e.g., Google Docs version tracking for edits). Stylometric Analysis: Compare to the author’s known writing style. Fact-Checking: AI may hallucinate fake citations or outdated facts. 5. Limitations & Challenges False Positives: Human-written technical/scientific content can be flagged as AI. False Negatives: Advanced models (e.g., GPT-4o) mimic human writing better. Ethical Concerns: Tools like Turnitin face criticism for privacy issues.
|
| 5 |
+
Add An interface of the Tool for user to add deepseek api and make sure you use that API in the code to send request to AI to hummanize this content.
|