Update 2025-04-13_16:26:04

This commit is contained in:
root
2025-04-13 16:26:06 +02:00
commit f5d5898dc4
2312 changed files with 422700 additions and 0 deletions

30
main.py Normal file
View File

@ -0,0 +1,30 @@
# main.py
# FastAPI backend for Emoji Evolution placeholder logic for LLM override
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from pathlib import Path
from fastapi.responses import JSONResponse, HTMLResponse
from pydantic import BaseModel
app = FastAPI()
# Mount the 'static' directory to serve frontend files
app.mount("/static", StaticFiles(directory="static"), name="static")
# Pydantic model for puzzle submission
class PuzzleSubmission(BaseModel):
sequence: list[str]
@app.get("/", response_class=HTMLResponse)
async def root_html():
return Path("static/index.html").read_text(encoding="utf-8")
@app.post("/api/check-puzzle")
async def check_puzzle(submission: PuzzleSubmission):
# Server-side logic is now obsolete (replaced by LLM check in frontend)
# Keeping this route for local fallback/testing if needed
if submission.sequence == ["😂", "😊", "🥳"]:
return JSONResponse({"result": "✅ Success!"})
return JSONResponse({"result": "❌ Try Again (LLM not used)"})