Spaces:
Sleeping
Sleeping
Upload myinfer_latest.py
Browse files100 unmodified lines101102103104105106104 unmodified lines211212213214215216217100 unmodified linesdef load_hubert():global hubert_modelmodels, _, _ = checkpoint_utils.load_model_ensemble_and_task(104 unmodified linesreturn jsonify({'success': True, 'message': 'File downloaded successfully', 'file_path': local_file_path})@app.route("/logout")def logout():100 unmodified lines101102103104105106107104 unmodified lines212213214215216217218219220221222223224100 unmodified linesdef load_hubert():global hubert_modelmodels, _, _ = checkpoint_utils.load_model_ensemble_and_task(104 unmodified linesreturn jsonify({'success': True, 'message': 'File downloaded successfully', 'file_path': local_file_path})@app.route('/list-weights', methods=['GET'])def list_weights():directory = 'weights'files = os.listdir(directory)# Extract filenames without their extensionsfilenames = [os.path.splitext(file)[0] for file in files if os.path.isfile(os.path.join(directory, file))]return jsonify(filenames)@app.route("/logout")def logout():
myinfer_latest.py+8-1