upload
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
511187ba16
commit
b84864841a
14
run.py
14
run.py
|
@ -1,6 +1,6 @@
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
from tensorflow import keras
|
from tensorflow import keras
|
||||||
|
import requests
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import os
|
import os
|
||||||
# Version Information
|
# Version Information
|
||||||
|
@ -74,4 +74,16 @@ with tf.device('/GPU:0'):
|
||||||
model.fit(X_train_scaled, y_train_categorical, epochs=10)
|
model.fit(X_train_scaled, y_train_categorical, epochs=10)
|
||||||
model.save('mymodel.keras')
|
model.save('mymodel.keras')
|
||||||
|
|
||||||
|
print("finished training")
|
||||||
|
|
||||||
|
myurl = 'https://share.storage.sandbox.iuk.hdm-stuttgart.de/upload'
|
||||||
|
|
||||||
|
print("uploading file")
|
||||||
|
files = {
|
||||||
|
'fileUpload':('mymodel.keras', open('mymodel.keras', 'rb'),'application/octet-stream')
|
||||||
|
}
|
||||||
|
|
||||||
|
response = requests.post(myurl, files=files)
|
||||||
|
print(response,response.text)
|
||||||
|
|
||||||
print("done")
|
print("done")
|
Loading…
Reference in New Issue