You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently testing calling the api locally. There seems to be the following things that need to be done still on the backend:
send_file I think needs to be imported from flask, I am getting a NameError.
each api call needs to return something, probably a JSON string, to indicate that the request was successful. Otherwise, on my end, I'm getting status code 500s (that's an error), even though it seems like post-file in the very least definitely works.
we need to allow more than one person to be able to upload a file at once, or in the very least, we need to put proper restrictions so that trying to upload a file when the server is already working on a file will reject the call.
the key name should specify the file identifier of the resulting file (so {name}.mid instead of result.mid).
zip support (I'm not actually sure if it's supported or not?)
lower priority: we need to make begin_transfer call lstm.py, predict.py in a less hacky way. Currently I don't have all of the dependencies installed, so when these scripts are run, they won't work, but because it's using os.system no errors are returned. I don't know how Python modularization works but it should be looked into.
lowest priority: on lines 40-41 currently we use os.system to call to unzip the files and to remove the zip files. Using os.system here is platform-dependent (rm -rf won't function on Windows) which is generally bad, there are definitely file utilities built into Python that we could use instead.
Currently testing calling the api locally. There seems to be the following things that need to be done still on the backend:
send_fileI think needs to be imported from flask, I am getting a NameError.post-filein the very least definitely works.nameshould specify the file identifier of the resulting file (so{name}.midinstead ofresult.mid).begin_transfercalllstm.py,predict.pyin a less hacky way. Currently I don't have all of the dependencies installed, so when these scripts are run, they won't work, but because it's usingos.systemno errors are returned. I don't know how Python modularization works but it should be looked into.os.systemto call to unzip the files and to remove the zip files. Usingos.systemhere is platform-dependent (rm -rfwon't function on Windows) which is generally bad, there are definitely file utilities built into Python that we could use instead.