Spaces:
Build error
Build error
faizr206 commited on
Commit ·
b388a3b
1
Parent(s): ec23524
upload fix2
Browse files213 unmodified lines214215216217218219220221222223224225226213 unmodified linesreturn mp4.read_bytes(), png_pathdef _upload_image_to_gemini(png_path: Path):"""Upload an image to Gemini Files API and return the file reference."""if not client or not png_path or not png_path.exists():return Nonelimiter.acquire()with open(png_path, "rb") as f:file_ref = client.files.upload(f) # positional arg; no 'path=' kwreturn file_refdef llm_generate_manim_code(prompt: str, previous_code: Optional[str] = None) -> str:213 unmodified lines214215216217218219220221222223224225226227228229213 unmodified linesreturn mp4.read_bytes(), png_pathdef _def _upload_image_to_gemini(png_path: Path):"""Upload an image to Gemini Files API and return the file reference."""if not client or not png_path or not png_path.exists():return Nonelimiter.acquire()with open(png_path, "rb") as f:file_ref = client.files.upload(file=f, # <-- keyword arg, not positionalconfig={"mime_type": "image/png"} # helpful but optional)return file_refdef llm_generate_manim_code(prompt: str, previous_code: Optional[str] = None) -> str:
app/main.py+5-2