Added some more models
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
6
main.py
6
main.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user