Allow API requests to use parameter presets

This commit is contained in:
oobabooga 2023-06-13 20:34:35 -03:00
parent 8936160e54
commit 474dc7355a
8 changed files with 96 additions and 58 deletions

View file

@ -1,5 +1,6 @@
import os
import re
from datetime import datetime
from pathlib import Path
from modules import shared
@ -41,6 +42,10 @@ def delete_file(fname):
logger.info(f'Deleted {fname}.')
def current_time():
return f"{datetime.now().strftime('%Y-%m-%d-%H%M%S')}"
def atoi(text):
return int(text) if text.isdigit() else text.lower()