Skip to content

Conversation

matatratata
Copy link
Contributor

No description provided.

from PIL import Image

from fasthtml.common import *
from replicate import Client
Copy link
Contributor Author

@matatratata matatratata Sep 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fasthtml.common imports most of the modules. Among them - basics.replicate fn which can be confused with replicate module.

tables = database('data/gens.db').t
gens = tables.t.gens
if not gens in tables.t:
gens = tables.gens
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted changes - missed .t locally from line 11

@matatratata matatratata changed the title fix Table items creation with insert returns None id fix wrong commit, optimize imports Sep 8, 2024
@matatratata matatratata changed the title fix wrong commit, optimize imports revert tabels operations changes, optimize imports Sep 8, 2024
folder = f"data/gens/{str(uuid.uuid4())}"
os.makedirs(folder, exist_ok=True)
g = gens.insert(Generation(prompt=prompt, folder=folder))
g = gens.insert(Generation(prompt=prompt, id=f"{gens.count}", folder=folder))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None was propagated, due to manual modules import. No longer an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant