seawolf2357 commited on
Commit
5df96e9
Β·
verified Β·
1 Parent(s): 14c2481

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +0 -90
index.html CHANGED
@@ -393,7 +393,6 @@ textarea::placeholder{color:var(--text-muted);font-size:13px;}
393
  <div class="nav-item" data-tab="highlight" onclick="switchTab('highlight')"><span class="nav-icon">🎨</span><span>ν•˜μ΄λΌμ΄νŠΈ</span></div>
394
  <div class="nav-item" data-tab="humanize" onclick="switchTab('humanize')"><span class="nav-icon">βš”οΈ</span><span>AI→인간</span></div>
395
  <div class="nav-item" data-tab="plagiarism" onclick="switchTab('plagiarism')"><span class="nav-icon">πŸ“‹</span><span>ν‘œμ ˆ</span></div>
396
- <div class="nav-item" data-tab="document" onclick="switchTab('document')"><span class="nav-icon">πŸ“„</span><span>λ¬Έμ„œ</span></div>
397
  </nav>
398
 
399
  <!-- Panel 1 -->
@@ -487,34 +486,6 @@ textarea::placeholder{color:var(--text-muted);font-size:13px;}
487
  </div>
488
  </div>
489
 
490
- <!-- Panel 5: Document Analysis -->
491
- <div class="panel" id="panel-document">
492
- <div class="card">
493
- <div class="card-header"><div class="card-icon" style="background:rgba(84,181,255,0.12);border:1px solid rgba(84,181,255,0.2);">πŸ“„</div><div class="card-title">λ¬Έμ„œ AI 뢄석</div></div>
494
- <div class="card-desc">PDF Β· DOCX Β· HWP Β· HWPX Β· TXT λ¬Έμ„œλ₯Ό μ—…λ‘œλ“œν•˜λ©΄ μ„Ήμ…˜λ³„ AI 탐지 히트맡 λ³΄κ³ μ„œλ₯Ό μƒμ„±ν•©λ‹ˆλ‹€.</div>
495
- <div class="file-drop" id="file-drop" onclick="document.getElementById('file-input').click()">
496
- <input type="file" id="file-input" accept=".pdf,.docx,.hwp,.hwpx,.txt,.md,.csv" onchange="handleFile(this)">
497
- <div class="file-drop-icon">πŸ“‚</div>
498
- <div class="file-drop-text">ν΄λ¦­ν•˜κ±°λ‚˜ νŒŒμΌμ„ λ“œλž˜κ·Έν•˜μ„Έμš”</div>
499
- <div class="file-drop-hint">PDF Β· DOCX Β· HWP Β· HWPX Β· TXT Β· MD Β· CSV</div>
500
- </div>
501
- <div class="file-info" id="file-info">
502
- <span>πŸ“Ž</span>
503
- <span class="file-info-name" id="file-name"></span>
504
- <span class="file-info-size" id="file-size"></span>
505
- <span class="file-remove" onclick="clearFile()">βœ•</span>
506
- </div>
507
- <div style="margin-top:14px;">
508
- <button class="btn btn-primary" id="btn-document" onclick="runDocument()">πŸ“„ λ¬Έμ„œ AI 뢄석</button>
509
- </div>
510
- </div>
511
- <div class="loader" id="loader-document"><div class="loader-ring"></div><div class="loader-text">λ¬Έμ„œ μΆ”μΆœ + μ„Ήμ…˜λ³„ 뢄석 쀑</div><div class="loader-dots"><span></span><span></span><span></span></div></div>
512
- <div id="result-document-area" style="display:none;">
513
- <div class="result-html" id="result-document"></div>
514
- <div class="log-box" id="result-document-log"></div>
515
- </div>
516
- </div>
517
-
518
  <footer class="footer">
519
  <div class="footer-brand">TeXray</div>
520
  <div class="footer-line"></div>
@@ -729,67 +700,6 @@ function clearInline(textareaId, statusId){
729
  document.getElementById(statusId).classList.remove('active');
730
  document.getElementById(statusId).querySelector('.fname').style.color='';
731
  }
732
-
733
- /* ═══ νƒ­5: λ¬Έμ„œ 뢄석 μ „μš© ═══ */
734
- let selectedFile=null;
735
- function handleFile(input){
736
- if(!input.files||!input.files[0])return;
737
- selectedFile=input.files[0];
738
- const fi=document.getElementById('file-info');
739
- document.getElementById('file-name').textContent=selectedFile.name;
740
- document.getElementById('file-size').textContent=Math.round(selectedFile.size/1024)+'KB';
741
- fi.classList.add('active');
742
- document.getElementById('file-drop').style.display='none';
743
- }
744
- function clearFile(){
745
- selectedFile=null;
746
- document.getElementById('file-info').classList.remove('active');
747
- document.getElementById('file-drop').style.display='';
748
- document.getElementById('file-input').value='';
749
- }
750
-
751
- /* Drag & drop for tab 5 */
752
- const fdrop=document.getElementById('file-drop');
753
- if(fdrop){
754
- fdrop.addEventListener('dragover',e=>{e.preventDefault();fdrop.classList.add('dragover');});
755
- fdrop.addEventListener('dragleave',()=>fdrop.classList.remove('dragover'));
756
- fdrop.addEventListener('drop',e=>{
757
- e.preventDefault();fdrop.classList.remove('dragover');
758
- if(e.dataTransfer.files[0]){
759
- const dt=new DataTransfer();dt.items.add(e.dataTransfer.files[0]);
760
- document.getElementById('file-input').files=dt.files;
761
- handleFile(document.getElementById('file-input'));
762
- }
763
- });
764
- }
765
-
766
- async function runDocument(){
767
- if(!selectedFile){alert('νŒŒμΌμ„ λ¨Όμ € μ—…λ‘œλ“œν•˜μ„Έμš”.');return;}
768
- const btn=document.getElementById('btn-document');btn.disabled=true;
769
- document.getElementById('result-document-area').style.display='none';
770
- sw('loader-document');
771
- try{
772
- /* 1. Upload */
773
- const uploadedPath=await uploadFileToGradio(selectedFile);
774
- /* 2. Call run_document API (Gradio 6.x FileData ν˜•μ‹) */
775
- const fileData=makeFileData(uploadedPath, selectedFile.name);
776
- const d=await gc('/run_document',[fileData]);
777
- hw('loader-document');
778
- document.getElementById('result-document-area').style.display='block';
779
- document.getElementById('result-document').innerHTML=d[0]||'';
780
- document.getElementById('result-document-log').textContent=d[1]||'';
781
- /* 3. Report download (d[2] = file path) */
782
- if(d[2]){
783
- const dlArea=document.getElementById('result-document-log');
784
- dlArea.textContent+= '\n\nπŸ“₯ λ³΄κ³ μ„œ: λ³΄κ³ μ„œλŠ” Gradio UI(/gradio)μ—μ„œ λ‹€μš΄λ‘œλ“œ κ°€λŠ₯ν•©λ‹ˆλ‹€.';
785
- }
786
- }catch(e){
787
- hw('loader-document');
788
- document.getElementById('result-document-area').style.display='block';
789
- showError(document.getElementById('result-document'),e.message);
790
- }
791
- btn.disabled=false;
792
- }
793
  /* ═══ textarea λ“œλž˜κ·Έμ•€λ“œλ‘­ 파일 (νƒ­1~4) ═══ */
794
  const dropMappings=[
795
  {ta:'input-detect',fs:'fs-detect'},
 
393
  <div class="nav-item" data-tab="highlight" onclick="switchTab('highlight')"><span class="nav-icon">🎨</span><span>ν•˜μ΄λΌμ΄νŠΈ</span></div>
394
  <div class="nav-item" data-tab="humanize" onclick="switchTab('humanize')"><span class="nav-icon">βš”οΈ</span><span>AI→인간</span></div>
395
  <div class="nav-item" data-tab="plagiarism" onclick="switchTab('plagiarism')"><span class="nav-icon">πŸ“‹</span><span>ν‘œμ ˆ</span></div>
 
396
  </nav>
397
 
398
  <!-- Panel 1 -->
 
486
  </div>
487
  </div>
488
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
489
  <footer class="footer">
490
  <div class="footer-brand">TeXray</div>
491
  <div class="footer-line"></div>
 
700
  document.getElementById(statusId).classList.remove('active');
701
  document.getElementById(statusId).querySelector('.fname').style.color='';
702
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
703
  /* ═══ textarea λ“œλž˜κ·Έμ•€λ“œλ‘­ 파일 (νƒ­1~4) ═══ */
704
  const dropMappings=[
705
  {ta:'input-detect',fs:'fs-detect'},