amaye15 commited on
Commit
8c624d1
1 Parent(s): 3745c32

Upload run.py

Browse files
Files changed (1) hide show
  1. run.py +14 -0
run.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from modeling_autoencoder import AutoEncoderConfig, AutoEncoder
2
+
3
+ from transformers import PretrainedConfig, PreTrainedModel, AutoConfig, AutoModel
4
+
5
+ AutoEncoderConfig.register_for_auto_class()
6
+ AutoEncoder.register_for_auto_class("AutoModel")
7
+
8
+ AutoConfig.register("autoencoder", AutoEncoderConfig)
9
+ AutoModel.register(AutoEncoderConfig, AutoModel)
10
+
11
+ AutoEncoder(AutoEncoderConfig()).push_to_hub("autoencoder")
12
+
13
+ # config = AutoConfig.from_pretrained("amaye15/autoencoder", trust_remote_code = True)
14
+ # autoencoder = AutoModel.from_config(config, trust_remote_code = True)