Spaces:
Sleeping
Sleeping
Update server.py
Browse files
server.py
CHANGED
@@ -33,3 +33,10 @@ class get_files:
|
|
33 |
except Exception as e:
|
34 |
return f"Error loading file: {str(e)}"
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
except Exception as e:
|
34 |
return f"Error loading file: {str(e)}"
|
35 |
|
36 |
+
def submit_weights(model, repository, model_out_name, token):
|
37 |
+
"""submits model to repository"""
|
38 |
+
repo = repository + '/' + model_out_name
|
39 |
+
|
40 |
+
model.push_to_hub(repo, token = token)
|
41 |
+
tokenizer.push_to_hub(repo, token = token)
|
42 |
+
return 0
|