mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-24 22:15:02 +03:00
14 lines
380 B
Python
14 lines
380 B
Python
|
|
||
|
from fastapi.responses import FileResponse
|
||
|
import os
|
||
|
|
||
|
def mod_get_model(modelFile:str):
|
||
|
modelPath = os.path.join("MMVC_Trainer/logs", modelFile)
|
||
|
return FileResponse(path=modelPath)
|
||
|
|
||
|
def mod_delete_model(modelFile:str):
|
||
|
modelPath = os.path.join("MMVC_Trainer/logs", modelFile)
|
||
|
os.unlink(modelPath)
|
||
|
return {"Model deleted": f"{modelFile}"}
|
||
|
|