Spaces:
Runtime error
Runtime error
adding checks
Browse files118 unmodified lines119120121122123124118 unmodified linesdef predict_full(model, text, melody, duration, topk, topp, temperature, cfg_coef, progress=gr.Progress()):global INTERRUPTINGINTERRUPTING = Falsetopk = int(topk)load_model(model)118 unmodified lines119120121122123124125126127128129130131118 unmodified linesdef predict_full(model, text, melody, duration, topk, topp, temperature, cfg_coef, progress=gr.Progress()):global INTERRUPTINGINTERRUPTING = Falseif temperature < 0:raise gr.Error("Temperature must be >= 0.")if topk < 0:raise gr.Error("Topk must be non-negative.")if topp < 0:raise gr.Error("Topp must be non-negative.")topk = int(topk)load_model(model)
app.py+7