File size: 3,053 Bytes
4442059
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>Detector de Intolerância Religiosa</title>
<style>
  body { font-family: Arial; margin: 30px; }
    h1 { color: #333; }
      #result { margin-top: 20px; padding: 10px; border: 1px solid #ccc; }
      </style>
      </head>
      <body>

      <h1>Detector de Intolerância Religiosa em Vídeo</h1>

      <form id="uploadForm">
        <input type="file" id="videoFile" accept="video/*" required><br><br>
          <button type="submit">Analisar Vídeo</button>
          </form>

          <div id="result"></div>

          <script>
          const form = document.getElementById('uploadForm');
          const resultDiv = document.getElementById('result');

          form.addEventListener('submit', async (e) => {
            e.preventDefault();
              const file = document.getElementById('videoFile').files[0];

                if (!file) {
                    alert('Por favor, selecione um vídeo.');
                        return;
                          }

                            const formData = new FormData();
                              formData.append('video', file);

                                resultDiv.innerHTML = 'Analisando vídeo, aguarde...';

                                  const response = await fetch('http://localhost:3000/analisar-video', {
                                      method: 'POST',
                                          body: formData
                                            });

                                              const data = await response.json();

                                                if (data.error) {
                                                    resultDiv.innerHTML = 'Erro: ' + data.error;
                                                      } else {
                                                          resultDiv.innerHTML = `<strong>Resultado:</strong> ${data.resultado}<br><br><strong>Texto transcrito:</strong><br>${data.transcricao}`;
                                                            }
                                                            });
                                                            </script>

                                                            <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=Rwhehhehe/gfff" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
                                                            </html>