Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -115,6 +115,11 @@ blockchain = Blockchain()
|
|
115 |
def add_transaction(id, kind, data):
|
116 |
if kind == "add" or kind == "inference" or kind == "out":
|
117 |
blockchain.new_transaction(id, kind, data)
|
|
|
|
|
|
|
|
|
|
|
118 |
return "ok"
|
119 |
else:
|
120 |
return "fail"
|
|
|
115 |
def add_transaction(id, kind, data):
|
116 |
if kind == "add" or kind == "inference" or kind == "out":
|
117 |
blockchain.new_transaction(id, kind, data)
|
118 |
+
|
119 |
+
if len(blockchain.current_transactions)>=10:
|
120 |
+
proof(model_name)
|
121 |
+
new_block = blockchain.new_block()
|
122 |
+
|
123 |
return "ok"
|
124 |
else:
|
125 |
return "fail"
|