Added some more models
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-04-03 19:41:03 +03:00
parent 9ba51c0fd1
commit c0d2b1e35b
2 changed files with 10 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-d", "--dry", action='store_true', help="Run without sending a message")
parser.add_argument("-m", "--model", help="Specify model file")
args = parser.parse_args()
load_dotenv()
@@ -15,6 +16,7 @@ api_id = os.getenv('API_ID')
api_hash = os.getenv('API_HASH')
entity = os.getenv('ENTITY')
dry_run = args.dry
filename = args.model
def create_message(model):
message = ''
@@ -30,7 +32,9 @@ def create_message(model):
avalible_files = os.listdir('data')
avalible_files.remove('.gitkeep')
filename = random.choice(avalible_files)
if (not filename):
filename = random.choice(avalible_files)
print(f'chosen {filename}')
with open(os.path.join('data', filename), 'r') as f:
model_json = f.read()