playback / templates /index.html
cngsm's picture
Create templates/index.html
b9d375a verified
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GEM - Separador de Áudio</title>
<style>
body { font-family: sans-serif; background-color: #f0f2f5; color: #333; max-width: 600px; margin: 40px auto; padding: 20px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
h1, h2 { text-align: center; color: #1c1e21; }
form { display: flex; flex-direction: column; align-items: center; gap: 15px; margin-bottom: 30px; }
input[type="file"] { border: 1px solid #ddd; padding: 10px; border-radius: 5px; width: 100%; }
input[type="submit"] { background-color: #0d6efd; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; }
input[type="submit"]:hover { background-color: #0b5ed7; }
.results { text-align: center; }
a { display: block; background-color: #28a745; color: white; text-decoration: none; padding: 12px; margin: 10px auto; border-radius: 5px; width: 80%; }
a:hover { background-color: #218838; }
.error { color: #dc3545; text-align: center; }
</style>
</head>
<body>
<h1>🎧 GEM – Separador de Áudio Inteligente</h1>
<form method="post" enctype="multipart/form-data">
<input type="file" name="audiofile" accept="audio/*" required>
<input type="submit" value="Separar Áudio">
</form>
{% if error %}
<p class="error">{{ error }}</p>
{% endif %}
{% if vocals_path %}
<div class="results">
<h2>Download dos Arquivos Separados</h2>
<a href="{{ url_for('download_file', filename=vocals_path) }}">Baixar Vocais (vocals.wav)</a>
<a href="{{ url_for('download_file', filename=accompaniment_path) }}">Baixar Instrumental (accompaniment.wav)</a>
</div>
{% endif %}
</body>
</html>