Spaces:
Runtime error
Runtime error
Commit ·
f993b83
1
Parent(s): 0b76010
Update app.py
Browse files22 unmodified lines23242526272829303132333422 unmodified linesGE_data = GE_data.tolist()def predict(dist, flight_cycle, t50_max, nc_avg, ps30_max, nrc_max, bpr_max, w32_avg):with urllib.request.urlopen('https://github.com/GEProject/GEProject/blob/main/final_model.pkl?raw=true') as response, open('final_model.pkl', 'wb') as out_file:shutil.copyfileobj(response, out_file)pred = predict_model(tuned_ada)return {'RUL': pred['Label']}dist = gr.inputs.Number()22 unmodified lines2324252627282930313233343536373839404122 unmodified linesGE_data = GE_data.tolist()def predict(dist, flight_cycle, t50_max, nc_avg, ps30_max, nrc_max, bpr_max, w32_avg):df = pd.DataFrame.from_dict({'dist': [dist], 'flight_cycle': [flight_cycle], 't50_max': [t50_max], 'nc_avg': [nc_avg], 'ps30_max': [ps30_max],'nrc_max': [nrc_max], 'bpr_max': [bpr_max], 'w32_avg': [w32_avg]})with urllib.request.urlopen('https://github.com/GEProject/GEProject/blob/main/final_model.pkl?raw=true') as response, open('final_model.pkl', 'wb') as out_file:shutil.copyfileobj(response, out_file)pred = predict_model(tuned_ada)return {'RUL': pred['Label']}dist = gr.inputs.Number()
app.py+12-5