from fastapi import FastAPI from pydantic import BaseModel from app.model import create_model from app.database import connect_to_database from app.integration import integrate_data import os app = FastAPI() @app.get("/") async def root(): def main(): # Veritabanına bağlan db_connection = connect_to_database() # Modeli oluştur model = create_model() # Veriyi entegre et integrate_data(db_connection, model) return {"message":"api is running"} if __name__ == "__main__": uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)