{% extends "simplebase.html" %}
{% block content %}
<h3>Add a language</h3>
<form method="POST" action="/upload-language" enctype="multipart/form-data">
    <a href="https://coqui.ai/models">Download models</a>
    <div class="form-group">
        <div class="form-group">
            <label for="name">Language</label>
            <input type="text" id="name" name="name" required>
        </div>
        <div class="form-group">
            <label for="model"><a href="#" data-toggle="tooltip" data-placement="top" title="The transcription model for the language. Only required for the dataset step of the process">Model (.pbmm) (optional)</a></label>
            <input type="file" id="model" name="model">
        </div>
        <div class="form-group">
            <label for="alphabet">Alphabet (.txt)</label>
            <input type="file" id="alphabet" name="alphabet" required>
        </div>
    </div>
    <input type="submit" class="btn btn-primary">
</form>
<hr>

<h3>Add a Hifi-gan Vocoder</h3>
<form method="POST" action="/add-vocoder" enctype="multipart/form-data">
    <div class="form-group">
        <label for="name">Name</label>
        <input type="text" id="name" name="name" required>
    </div>
    <p>If you don't have one: <a href="https://drive.google.com/drive/folders/1YuOoV3lO2-Hhn1F2HJ2aQ4S0LC1JdKLd">Download pretrained (use 'g_' model)</a></p>
    <div class="form-group">
        <label for="hifigan-model">Hifi-gan model</label>
        <input type="file" id="hifigan-model" name="hifigan-model">
    </div>
    <div class="form-group">
        <label for="hifigan-config">Hifi-gan config</label>
        <input type="file" id="hifigan-config" name="hifigan-config">
    </div>
    <input type="submit" class="btn btn-primary">
</form>
<hr>

<h3>Delete dataset</h3>
<form method="POST" action="/delete-dataset">
    <div class="form-group">
        <select class="form-control" id="dataset" name="dataset" required>
            {% for dataset in datasets %}
                <option value="{{dataset}}">{{dataset}}</option>
            {% endfor %}
        </select>
    </div>
    <input type="submit" class="btn btn-primary">
</form>
<hr>

<h3>Delete model</h3>
<form method="POST" action="/delete-model">
    <div class="form-group">
        <select class="form-control" id="model" name="model" required>
            {% for model in models %}
                <option value="{{model}}">{{model}}</option>
            {% endfor %}
        </select>
    </div>
    <input type="submit" class="btn btn-primary">
</form>
{% endblock %}
