maxpe commited on
Commit
bbdeb84
·
1 Parent(s): 991400c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -0
README.md CHANGED
@@ -85,4 +85,14 @@ with torch.no_grad():
85
  outputs = model(input_ids=data['input_ids'],attention_mask=data['attention_mask'])
86
  fin_outputs=torch.sigmoid(outputs).cpu().detach().numpy().tolist()
87
  pd.DataFrame(fin_outputs).to_csv(outfile,index=False,header=False,sep="\t",mode='a')
 
 
 
 
 
 
 
 
 
 
88
  ```
 
85
  outputs = model(input_ids=data['input_ids'],attention_mask=data['attention_mask'])
86
  fin_outputs=torch.sigmoid(outputs).cpu().detach().numpy().tolist()
87
  pd.DataFrame(fin_outputs).to_csv(outfile,index=False,header=False,sep="\t",mode='a')
88
+
89
+
90
+ # # dataset from file (one text per line)
91
+ # from datasets import Dataset
92
+
93
+ # with open(linesoftextfile,"rb") as textfile:
94
+ # textdict={"text":[x.decode().rstrip("\n") for x in textfile.readlines()]}
95
+
96
+ # inference_dataset=Dataset.from_dict(textdict)
97
+ # del(textdict)
98
  ```