Meir
Meir
Is there a good reason why not to do it this way? ```python from pydantic import root_validator, ValidationError from sqlmodel import SQLModel class Philosopher(SQLModel): __default_name__ = None @root_validator(pre=True) def default_name_validator(cls,...
It's not a perfect solution, but you can use `declared_attr` and `column_property`: ```python from typing import cast from sqlalchemy.orm import column_property, declared_attr ... class ScoreTableBase(SQLModel): __tablename__ = "scores" # type:...
First, datetime.now is not the same as GETUTCDATE(), you should use datetime.utcnow. Second, to solve your problem you need to add additional arguments to the Column class of the sqlalchemy:...
Fix to your `Paper` model: ```python similar: List["Paper"] = Relationship( link_model=PaperSimilarLink, sa_relationship_kwargs=dict( primaryjoin="Paper.id == PaperSimilarLink.paper_id", secondaryjoin="Paper.id == PaperSimilarLink.similar_id", ), ) ``` Working code: ```python from sqlmodel import SQLModel, Field, create_engine,...
The problem is because `uvicorn` is loading the file again, you can see this by adding `print`: ```python from sqlmodel import Field, SQLModel print("here") class Hero(SQLModel, table=True): ``` You can...
@adeebshihadeh I uploaded an example of automatic translation (currently using OpenAI) from an xml language file: https://gist.github.com/meirdev/fb63baa36dcaceebe7c74db07e9c339e
yeah... it's impossible to get a professional translation with AI, especially for short sentences that require context to understand them properly. (I can't check the French translation I only brought...
I fixed the code and slightly changed the prompt.
I changed it again, the languages are loaded from the `languages.json` file: ``` usage: Auto translate [-h] (-a | -f FILE [FILE ...]) [-t] options: -h, --help show this help...
https://github.com/meirdev/commaai-assistant (with Whisper)