Spaces:
Configuration error
Configuration error
File size: 580 Bytes
1373351 607e45b 15f3506 3fbfa5d 1373351 3fbfa5d 15f3506 607e45b 7232476 607e45b 7232476 607e45b aa55990 607e45b aa55990 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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)
|