Skip to content

Commit

Permalink
Update webhook.py
Browse files Browse the repository at this point in the history
  • Loading branch information
filispeen committed Oct 12, 2023
1 parent 5231ecf commit a231637
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions F_Discord_webhook/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
async def process(url, dataset_name, train_folder_name, train_start_date, percent, generation, training_time):
async with aiohttp.ClientSession() as session:
webhook = Webhook.from_url(url, session=session)
if percent >= 99:
if int(percent) >= 99:
embed = discord.Embed(title=f"AI Training Process ({dataset_name}, {train_folder_name}) completed.", description=f"Start Date: {datetime.fromtimestamp(train_start_date)}")
else:
embed = discord.Embed(title=f"AI Training Process ({dataset_name}, {train_folder_name})", description=f"Start Date: {datetime.fromtimestamp(train_start_date)}")
embed.add_field(name="Generations Trained", value=generation, inline=True)
total_training_time = datetime.fromtimestamp(datetime.timestamp(datetime.now())) - datetime.fromtimestamp(train_start_date)
embed.add_field(name="Total Elapsed Time", value=total_training_time, inline=True)
if not percent >= 99:
if not int(percent) >= 99:
embed.add_field(name="", value="", inline=False)
embed.add_field(name="Percentage of Training Completed", value=f"{percent}%", inline=True)
embed.add_field(name="Estimated Completion Time", value=training_time, inline=True)
Expand Down

0 comments on commit a231637

Please sign in to comment.