AyushSankar13 commited on
Commit
7a97419
·
verified ·
1 Parent(s): 5c51021

Update web/analyzer.html

Browse files
Files changed (1) hide show
  1. web/analyzer.html +4 -1
web/analyzer.html CHANGED
@@ -386,7 +386,10 @@
386
  document.getElementById("ask-btn").onclick = async () => {
387
  const q = document.getElementById("user-question").value.trim();
388
  if (!q) return;
389
-
 
 
 
390
 
391
  chat.innerHTML += `<p><strong>You:</strong> ${q}</p>`;
392
  chat.innerHTML += `<p><strong>Chatbot:</strong> <em>Thinking...</em></p>`;
 
386
  document.getElementById("ask-btn").onclick = async () => {
387
  const q = document.getElementById("user-question").value.trim();
388
  if (!q) return;
389
+ if (!extractedText) {
390
+ alert("Please analyze a document first.");
391
+ return;
392
+ }
393
 
394
  chat.innerHTML += `<p><strong>You:</strong> ${q}</p>`;
395
  chat.innerHTML += `<p><strong>Chatbot:</strong> <em>Thinking...</em></p>`;