tykiww commited on
Commit
f82747d
1 Parent(s): 0f115b9

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +7 -0
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