vineelagampa AyushSankar13 commited on
Commit
af846ab
·
verified ·
1 Parent(s): 5c51021

Update web/analyzer.html (#48)

Browse files

- Update web/analyzer.html (7a974194493baa55015ee3d0696f148da7af826d)


Co-authored-by: Ayush Sankar <AyushSankar13@users.noreply.huggingface.co>

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>`;