๐Ÿšฉ Report: Illegal or restricted content

#63
by jhsbddjsndjn - opened

Models uploaded in the past are not deleted, so they are suitable for unethical use. It is not legal to be able to say anything you want using the voice models of uploaded artists or other identities.

The easiest way to prevent this is to duplicate this space, but this makes it difficult to make the UI compatible with deleting models.

The easiest way to prevent this is to duplicate this space, but this makes it difficult to make the UI compatible with deleting models.

Yes but I can't delete my uploaded models now this space. This is very scary and dangerous

add(app.py):

def delete_model(model_name):
    global MODELS
    if model_name == "Test Model":
        return "Cannot delete the default Test Model"
    
    for i, model in enumerate(MODELS):
        if model["model_name"] == model_name:
            try:
                if os.path.exists(model["model"]):
                    os.remove(model["model"])
                if model["index"] and os.path.exists(model["index"]):
                    os.remove(model["index"])
                del MODELS[i]
                return f"Model {model_name} deleted successfully"
            except Exception as e:
                return f"Error deleting model: {str(e)}"
    
    return "Model not found"



------




    with gr.Tab("Model Loader (Download and Upload)"):
        with gr.Accordion("Model Downloader", open=False):
            gr.Markdown(
                "Download the model from the following URL and upload it here. (Huggingface RVC model)"
            )
            model = gr.Textbox(lines=1, label="Model URL")
            name = gr.Textbox(lines=1, label="Model Name", placeholder="Model Name")
            download_button = gr.Button("Download Model")
            status = gr.Textbox(lines=1, label="Status", placeholder="Waiting....", interactive=False)
            model_pth = gr.Textbox(lines=1, label="Model pth file", placeholder="Waiting....", interactive=False)
            index_pth = gr.Textbox(lines=1, label="Index pth file", placeholder="Waiting....", interactive=False)
            download_button.click(download_from_url, [model, name], outputs=[status, model_pth, index_pth])
        with gr.Accordion("Upload A Model", open=False):
            index_file_upload = gr.File(label="Index File (.index)")
            pth_file_upload = gr.File(label="Model File (.pth)")

            model_name = gr.Textbox(label="Model Name", placeholder="Model Name")
            upload_button = gr.Button("Upload Model")
            upload_status = gr.Textbox(lines=1, label="Status", placeholder="Waiting....", interactive=False)

            upload_button.click(upload_model, [index_file_upload, pth_file_upload, model_name], upload_status)
        
        with gr.Accordion("Delete A Model", open=False):
            def update_delete_dropdown():
                return gr.Dropdown(label="Model to Delete", choices=[model["model_name"] for model in MODELS if model["model_name"] != "Test Model"])
            
            delete_dropdown = gr.Dropdown(
                label="Model to Delete", 
                choices=[model["model_name"] for model in MODELS if model["model_name"] != "Test Model"],
                interactive=True
            )
            delete_button = gr.Button("Delete Model", variant="stop")
            delete_status = gr.Textbox(lines=1, label="Status", placeholder="Waiting....", interactive=False)
            refresh_delete_button = gr.Button("Refresh List")
            
            refresh_delete_button.click(
                update_delete_dropdown,
                outputs=[delete_dropdown]
            )
            delete_button.click(
                delete_model,
                inputs=[delete_dropdown],
                outputs=[delete_status]
            )

This is not tested, it may not work properly or there may be a mistake

Of course, this doesn't mean that you're the only one who can see the model.
Since translation AI is used

Of course, this doesn't mean that you're the only one who can see the model.
Since translation AI is used

Thank you, but my problem is not with the software's codes, but with the project's space. I don't want others to be able to use the model of my voice that I uploaded. I have privacy concerns.

Sign up or log in to comment