This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from simpletransformers.language_generation import LanguageGenerationModel, LanguageGenerationArgs | |
def main(): | |
model_path = "models/<model_folder>/" | |
model = LanguageGenerationModel("gpt2", model_path, args={'fp16': False, 'cache_dir': f"{model_path}.cache/"}, use_cuda=False) | |
args = { | |
'max_length': 1000, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def kill_all(self): | |
self.marionette.switch_to_frame() | |
self.marionette.execute_async_script(""" | |
// Kills all running apps, except the homescreen. | |
function killAll() { | |
let originsToClose = []; | |
let that = this; | |
let runningApps = window.wrappedJSObject.AppWindowManager.getRunningApps(); | |
for (let origin in runningApps) { |